I have a listview and i added data using ListViewItem, i added tag text to all rows.
while (...)
{
ListViewItem item = new ListViewItem();
item.Tag = (Int64)data[0];
item.Text = (string)data[1];
item.SubItems.Add((string)data[2]);
list.Items.Add(item);
}
Now i have a button the needs to remove items data form listview, but the problem is how to get tag values of selected rows ?
Loading
mirko gogicPosted Jun 18, 2008, 3:18 AM
Mahesh ChandPosted Jun 17, 2008, 10:01 PM
Something like this:
ListView.SelectedListViewItemCollection items=
this.ListView1.SelectedItems;
foreach ( ListViewItem item in items)
{
string str = item.Tag;
}