在Infragistics UltraGrid中启用和禁用列 [英] Enabling and disabling of columns in Infragistics UltraGrid

查看:236
本文介绍了在Infragistics UltraGrid中启用和禁用列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Infragistics网格,我想根据某些要求禁用和启用某些列.我读过一些说要使用AllowUpdate = DefaultableBoolean.True的文章,但对我却不起作用.

I have an Infragistics grid and I want to disable and enable some columns based upon some requirement. I have read some articles that say to use AllowUpdate = DefaultableBoolean.True but it did not work for me.

推荐答案

我想,当您谈论禁用的列时,意味着禁用这些列中的编辑. 另外,您没有指定语言,所以我将使用C#

I suppose that when you talk of disabled columns you mean disable editing in these columns. Also you don't specify the language, so I will use C#

UltraGridColumn c = grdWork.DisplayLayout.Bands[0].Columns["YourColumnName"];
c.CellActivation = Activation.NoEdit; 
c.CellClickAction = CellClickAction.CellSelect;

属性 CellActivation 也可以设置为Activation.DisabledActivation.ActivateOnly.
属性 CellClickAction 允许为单击的单元格设置适当的选择状态.您可以使用CellSelectRowSelect. (这是最后一个,以模仿ListBox的行为)
像往常一样,真正的困难是找到正确的属性.然后,Intellisense将为您提供这些值的含义的快速而公正的解释.

The property CellActivation could also be set to Activation.Disabled or Activation.ActivateOnly.
The property CellClickAction allows to set an appropriate selection status for the cell clicked. You could use CellSelect or RowSelect. (This last one, to mimic the behavior of a ListBox)
As usual, the real difficulty is to find the correct property. Then Intellisense will give you a quick and fair explanation of the meaning of these values.

这篇关于在Infragistics UltraGrid中启用和禁用列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆