【问题标题】:How to set disable cell on cell level instead of whole column如何在单元格级别而不是整个列上设置禁用单元格
【发布时间】:2017-07-25 20:10:44
【问题描述】:

根据列级别的解决方案: https://stackoverflow.com/a/11803015/1460189

private void dg_CellListSelect(object sender, CellEventArgs e)
    {
        if (e.Cell.Column.Key == "someID")
            e.Cell.Row.Cells["someColumn"].Activation = Activation.NoEdit;
        //Property or indexer cannot be assigned to -- it is read only
    }

基于特定单元格上的某些逻辑,我想禁用它,但显然无法设置属性Activation 的值?

【问题讨论】:

  • 您使用哪个版本的 Infragistics?
  • “我无法设置激活值”是什么意思?你有什么错误吗?或者你得到了一些例外?

标签: c# .net-3.5 infragistics ultrawingrid


【解决方案1】:

如果禁用意味着不允许用户编辑单元格,那么我认为您需要 ReadOnly 属性。

e.Cell.Row.Cells["someColumn"].ReadOnly = false;

【讨论】:

  • 没有可用的ReadOnly标签
猜你喜欢
  • 2016-11-03
  • 2015-07-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-06-14
  • 1970-01-01
相关资源
最近更新 更多