This question is locked. New answers and comments are not allowed.
Hi,
In my application, I am having to load the same instance of grid with different data sets at different times. I try to flush out the grid every time I load new dataset. Still, I am seeing exceptions when I load the grid the second or third time or later. The exceptions indicates that the grid is somehow still attached to its old dataset. This usually happens when a user applies filter or column sorting and then go on to load another dataset. Here is code that I use to flush the grid completely before loading new data.
Do I need to add something here or follow different approach?
this.radTargetGridNodes.SelectedItem = null;
this.radTargetGridNodes.FilterDescriptors.Clear();
this.radTargetGridNodes.FieldDescriptors.Clear();
this.radTargetGridNodes.Columns.Clear();
this.radTargetGridNodes.GroupDescriptors.Clear();
this.radTargetGridNodes.TableDefinition.ChildTableDefinitions.Clear();
this.radTargetGridNodes.Records.Clear();
this.radTargetGridNodes.ItemsSource = null;
Thanks,
Jitin
In my application, I am having to load the same instance of grid with different data sets at different times. I try to flush out the grid every time I load new dataset. Still, I am seeing exceptions when I load the grid the second or third time or later. The exceptions indicates that the grid is somehow still attached to its old dataset. This usually happens when a user applies filter or column sorting and then go on to load another dataset. Here is code that I use to flush the grid completely before loading new data.
Do I need to add something here or follow different approach?
this.radTargetGridNodes.SelectedItem = null;
this.radTargetGridNodes.FilterDescriptors.Clear();
this.radTargetGridNodes.FieldDescriptors.Clear();
this.radTargetGridNodes.Columns.Clear();
this.radTargetGridNodes.GroupDescriptors.Clear();
this.radTargetGridNodes.TableDefinition.ChildTableDefinitions.Clear();
this.radTargetGridNodes.Records.Clear();
this.radTargetGridNodes.ItemsSource = null;
Thanks,
Jitin