This question is locked. New answers and comments are not allowed.
What I'm trying to accomplish here is a in a hierachical grid, with the child grid using a gridviewcolumnselect populated with an observablecollection. When I select the header to check all the items in the childgrid, I want to delete them and remove them in the observablecollection. Not getting it to work exactly right. The item is not visibly removed from the observablecollection - although the record gets deleted. And the removal from the observablecollection triggers another selectedchangeevent. Here's my code .... any help would be soooo helpful.
private void _childGrid_SelectionChanged(object sender, SelectionChangeEventArgs e) { if (setPrompt == false) { RadWindow.Confirm("Are you sure you want to remove the selected instance(s)?", (s, args) => { if (args.DialogResult.HasValue && args.DialogResult.Value) { RadGridView gv = e.OriginalSource as RadGridView; foreach (var item in gv.Items) { var row = gv.ItemContainerGenerator.ContainerFromItem(item) as GridViewRow; if (row != null) { if (row.IsSelected == true) { UsersTableItem ti = row.DataContext as UsersTableItem; string selectedInstanceID = ti.InstanceID.ToString(); AppInstances.RemoveAppInstance(selectedInstanceID); ti.Children.Remove(ti); //ViewModel.LoadData(); } } } } }); } setPrompt = true; }