Get the cell value from cellClick in ObjectListVie

2019-08-23 22:48发布

问题:

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();
    }