Get the cell value from cellClick in ObjectListView's TreeListView

六月ゝ 毕业季﹏ 提交于 2019-12-13 04:15:06

问题


When I use the treeListView cellClick Event:

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

Using "CellClickEventArgs e", how can I find the current value (lets assume it is an Int32) of this specific cell?


回答1:


I assume that CellClickEventArgs contains property that indicate Index of cell. Try to get it and then grab cell from treeListView by index.




回答2:


Found the answer:

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


来源:https://stackoverflow.com/questions/25842238/get-the-cell-value-from-cellclick-in-objectlistviews-treelistview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!