【问题标题】:Get the cell value from cellClick in ObjectListView's TreeListView从 ObjectListView 的 TreeListView 中的 cellClick 中获取单元格值
【发布时间】:2014-09-15 06:45:24
【问题描述】:

当我使用treeListView cellClick 事件时:

private void treeListView_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e)

使用“CellClickEventArgs e”,我怎样才能找到这个特定单元格的当前值(假设它是一个 Int32)?

【问题讨论】:

    标签: c# objectlistview


    【解决方案1】:

    我假设CellClickEventArgs 包含指示单元格Index 的属性。尝试获取它,然后按索引从treeListView 中获取单元格。

    【讨论】:

    • 我找不到任何“grabCell”或类似的方法来做到这一点!
    【解决方案2】:

    找到答案:

        private void treeListView1_CellClick(object sender, BrightIdeasSoftware.CellClickEventArgs e)
        {
            string s = e.SubItem.ModelValue.ToString();
        }
    

    【讨论】:

      猜你喜欢
      • 2014-12-09
      • 2012-06-13
      • 2014-10-03
      • 2013-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多