Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ListView listview = <reference to ListView>;
- foreach (ListViewItem item in listView.SelectedItems)
- {
- item.Remove();
- }
- var ItemsToDelete = ... // wherever you get the collection of items to delete from
- var RemainingItems = yourList.FindAll(delegate(ListItem x) {
- return !ItemsToDelete.Contains(x)
- });
- yourListView.DataSource = RemainingItems;
- yourListView.DataBind();
Add Comment
Please, Sign In to add comment