I am having trouble trying to set a collection of selected items on a treelist view, this is the way I am going about it.
foreach (var l in s) { df = new Assets.TreeListClass(l.filterName, l.filterId); df.Items.Add(new Assets.TreeListClass(l.filterDesc, l.filterElementId)); obDataSelect.Add(df); } foreach (var gv in tlScenarioTypes.Items) { tlScenarioTypes.SelectedItems.Add(obDataSelect); }
error recieved
"Cannot change ObservableCollection during a CollectionChanged or PropertyChanged event."
but went I run my app, I receive this error and I've looked all over the net and through the forums for assistance, so I'm needing help in figuring out what I'm do wrong.
What I'm trying to do:
I have a grid that has a selection change event that fires, when it fires it triggers a wcf call that is populated to a collection that is already use to populate the treelistview. Based the on the items received, I would like to have those items that are in the collection selected. I already have a checkbox on the treelistview that can show selected.
Please help,