Hi All:
Ok I Have a Winforms Listview control with several items in it
I want to be able to click on an item and trigger code, sounds
simple enough so I try using a switch in the ListView click event
ListViewItem lItem = new ListViewItem();
int i = lItem.Index;
switch(ListView.SelectedItems.Index)
{
case 0:
//Do something
break;
case 1:
//Do something else
break;
}
This does nothing. There does'nt seem to be a way to reference individual list items using the ListView object
How do I correct this?
TIA
MeonR
Ok I Have a Winforms Listview control with several items in it
I want to be able to click on an item and trigger code, sounds
simple enough so I try using a switch in the ListView click event
ListViewItem lItem = new ListViewItem();
int i = lItem.Index;
switch(ListView.SelectedItems.Index)
{
case 0:
//Do something
break;
case 1:
//Do something else
break;
}
This does nothing. There does'nt seem to be a way to reference individual list items using the ListView object
How do I correct this?
TIA
MeonR