I have a ListView that is bound to a dataset. The user has ability to select multiple rows. I would like when a button is clicked, delete all selected items. For that I use a loop but get error message: Operation is not valid
while ItemsSource is in use. Access and modify elements with ItemsControl.ItemsSource instead. The code looks
If ListView1.SelectedItems.Count > 0 Then
For i As Integer = ListView1.SelectedItems.Count - 1 To 0 Step -1
The error message point to line ListView1.Items.Remove(ListView1.SelectedItems(i))
How to fix that problem. I will appreciate for sample.
View Complete Post