gpt4 book ai didi

c# - UltraGrid 过滤器单元格属性

转载 作者:太空宇宙 更新时间:2023-11-03 23:17:43 26 4
gpt4 key购买 nike

正在处理由其他人编写的代码。以下是代码的重要部分:

 UltraGridColumn col = columns.Add("FolderImage", "Status");
col.Header.Fixed = true;
col.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;

还有更多代码用于指定文件夹的行为,但与示例无关;截至目前,生成了以下结果:

enter image description here

如您所见,有一个灰色的“过滤器”按钮,并且缺少 pin:

我希望它看起来像这样:

enter image description here

即过滤器按钮需要进入状态列(它只需要为空白),并且应该启用图钉按钮。根据 Infragistics 手册,上面的代码应该会产生我正在寻找的结果,但事实并非如此。

最佳答案

要隐藏过滤器运算符(“A”字母),您需要将列的 FilterOperatorLocation 设置为 Hidden。要显示固定列的引脚,您需要将其标题 FixedHeaderIndicator 设置为 Button(顺便说一下,这是默认值,因此如果您没有在其他地方覆盖它,则可以跳过此步骤)。尝试使用这样的代码:

col.FilterOperatorLocation = FilterOperatorLocation.Hidden;
col.Header.FixedHeaderIndicator = FixedHeaderIndicator.Button;

关于c# - UltraGrid 过滤器单元格属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36700675/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com