Dynamic Event ListView

DevilInside

New member
Joined
Oct 4, 2007
Messages
1
Programming Experience
1-3
Hi

I've created several DYNAMIC ListView controls.
Now I want to catch the Event when I click on one of those ListViews to know on which ListViewItem (SelectedIndexChanged) they have clicked. How do I do that?

Example:
dim oListView as new ListView

dim oListViewItem as new ListViewItem()
dim oListViewItem2 as new ListViewItem()

oListView.items.add(oListViewItem)
oListView.items.add(oListViewItem2)

Thx
 
Last edited:
Use the AddHandler statement to add event handler for the SelectedIndexChanged event.
VB.NET:
Expand Collapse Copy
addhandler listview1.SelectedIndexChanged, addressof listview1_SelectedIndexChanged
 
Back
Top