get the value of the selecteditem in a list view
-
how to get a specified column value from the list view. listview row contains (x,y,z) and i want to get only the y ?
-
how to get a specified column value from the list view. listview row contains (x,y,z) and i want to get only the y ?
-
Hi prasadbuddhika, Try listview.items[rowIndex].subitems[IndexOfColum] items[rowIndex] returns the first column and subitems[0] is the second column etc... Hope this helps...
-
bcozican wrote:
subitems[0] is the second column
IIRC, it is the first.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
:~ listview.items[0].subitems[0] refers to the second column in the listview. listview.items[0] refers to the first column. Or am i missing something..?
bcozican wrote:
Or am i missing something..?
A unit test perhaps! I just double checked, SubItems[0] returns the 1st column. :)
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
:~ listview.items[0].subitems[0] refers to the second column in the listview. listview.items[0] refers to the first column. Or am i missing something..?
From MSDN: The first subitem in the ListViewItem..::.ListViewSubItemCollection is always the item that owns the subitems. When performing operations on subitems in the collection, be sure to reference index position 1 instead of 0 to make changes to the first subitem.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x)) -
From MSDN: The first subitem in the ListViewItem..::.ListViewSubItemCollection is always the item that owns the subitems. When performing operations on subitems in the collection, be sure to reference index position 1 instead of 0 to make changes to the first subitem.
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 beta 1 - out now!
((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))