Ice725 Posted June 2, 2005 Posted June 2, 2005 I have a User Control that reads Customers from a XML file and displays their information in a ListView. I have added the User Control to a Windows Form and it works fine. But now I wish to grab the Customer name (SubItems[0], or the first column) from the ListView Control when a ListViewItem is clicked/changed, and display it in a Label on the Windows Form. How should I go about doing this? Quote
Leaders snarfblam Posted June 2, 2005 Leaders Posted June 2, 2005 Your user control could raise events that pass the relevant data. In the listview's SelectedIndexChanged event handler, you could raise your own event. (If you don't know how to implement events, check the MSDN.) Quote [sIGPIC]e[/sIGPIC]
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.