Microsoft
Software
Hardware
Network
Question : c# listviewbox
I have a listview box with 2 columns (address, name). how can I access data stored in the second column? for example I use the following code to loop through the checked items in the list view box and I have a variable to store the text in the address column, but I cannot seem to get the name column text.
foreach (ListViewItem lv in lvDevices.CheckedItems)
{
string address = lv.ToString()
}
Answer : c# listviewbox
Assuming that you add column support, on your loop change:
string address = lv.SubItems[0].Text;
string name = lv.SubItems[1].Text;
Check:
http://stackoverflow.com/q
uestions/1
255635/how
-do-i-add-
to-a-
speci
fic-column
-in-listvi
ew-item
Random Solutions
Query to sort by length of text data
SBS 2008 Exchange Outlook error
primary ip address for a server?
Access DoCmd.runSQL running a SQLServer stored procedure
Can I turn on logging for only 1 mail account in Exchange 2003 server?
Recommended backup for a Server 2008 R2 Terminal Server
migrating sbs2003 to a new sbs2008
DHTML Menu & link to parent and Active link
Passing value from one page textbox to another page textboxes
Automatically save / read attachments