Now the problem is when I add grouping. Rerun the query and now the grid is empty. However if I remove the grouping, all the expected data is displayed on the grid and now if I regroup everything works fine until the ItemsSource on the grid is changed again (by re-running the query). Any idea why this is happening?
I tried removing the GroupingDescriptors and re-adding them .. Also tried rebinding when the ItemsSource changed .. both options did not work. What am I missing here?
Thanks.
5 Answers, 1 is accepted
Have you tried to set the ItemsSource to be the DataTable.DefaultView?
Regards,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Yes, I just tried DataTable.DefaultView but that did not help.. Here is the thing, every time I get data back from the server I'm recreating the DataTable using a converter. Could that be the problem? Converter returns a DataTable (also tried returning DataTable.DefaultView) ..
XAML looks like below:
<telerik:RadGridView.ItemsSource>
<MultiBinding Converter="{StaticResource CollectionToDataTableConverter}" >
<Binding Path="UIItems" Mode="TwoWay" />
<Binding Path="Fields" Mode="TwoWay" />
</MultiBinding>
</telerik:RadGridView.ItemsSource>
I also tried adding an event handler on ItemsSource_Changed and within it removed the groupDescriptor and adding it back .. that also did not help.
Recreating the DataTable while you have some Grouping applied should not be a problem for the Items to be refreshed. Would it be possible for you to replicate the issue in a simple demo project? You could then open a support thread and send us the solution to check it locally.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
You should be assigned as a licensed user in order to be able to open a support ticket. Please ask the licence holder to add you as such.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.