G
GTi
I have a listview that with selected items.
But I want to "reselect" items after a refresh.
Each items have a uniqe value in the Tag object.
After a refresh some new items may be added or removed
so using item index is not possible.
To get the list of selected items I use:
ListView.SelectedListViewItemCollection selItems =
this.listView1.SelectedItems;
And to get the currrent focused item (may not be selected):
focusItem = this.listView1.FocusedItem;
But how can I reselect items after a refresh, including the focused item ?
foreach(ListViewItem item in selItems)
{
?????
}
But I want to "reselect" items after a refresh.
Each items have a uniqe value in the Tag object.
After a refresh some new items may be added or removed
so using item index is not possible.
To get the list of selected items I use:
ListView.SelectedListViewItemCollection selItems =
this.listView1.SelectedItems;
And to get the currrent focused item (may not be selected):
focusItem = this.listView1.FocusedItem;
But how can I reselect items after a refresh, including the focused item ?
foreach(ListViewItem item in selItems)
{
?????
}