Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • Leaders
Posted
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.)
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...