This question is locked. New answers and comments are not allowed.
Hi there,
When using a basic RIA Services domain data source initialised via XAML, the Q3 2011 version of the GroupDescriptor implementation is throwing an exception:
I'm getting "A first chance exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Data", whilst it worked fine with a previous release. I got it working by binding the data once the async operation had completed, but I would prefer just to have it in the XAML like it worked before.
Workaround:
Remove GroupDescriptor XAML, and instead add handler for datasource "LoadedData" event. Manually add the GroupDescriptor in the codebehind:
I have a working solution available for download here: RadControlsGroupDescriptorAsync.zip
When using a basic RIA Services domain data source initialised via XAML, the Q3 2011 version of the GroupDescriptor implementation is throwing an exception:
<UserControl x:Class="RadControlsGroupDescriptorAsync.MainPage" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" xmlns:Web="clr-namespace:RadControlsGroupDescriptorAsync.Web" mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> <Grid x:Name="LayoutRoot"> <riaControls:DomainDataSource AutoLoad="True" Name="FooBarDomainDataSource" QueryName="GetFooBars" > <riaControls:DomainDataSource.DomainContext> <Web:FooBarContext /> </riaControls:DomainDataSource.DomainContext> </riaControls:DomainDataSource> <telerik:RadGridView AutoGenerateColumns="True" Width="500" Height="400" ItemsSource="{Binding ElementName=FooBarDomainDataSource, Path=Data}" Name="FooBarDataGrid" IsReadOnly="False" ShowGroupPanel="False" IsBusy="{Binding ElementName=FooBarDomainDataSource, Path=IsBusy}" AutoExpandGroups="True"> <telerik:RadGridView.GroupDescriptors> <telerik:GroupDescriptor Member="Foo"/> </telerik:RadGridView.GroupDescriptors> </telerik:RadGridView> </Grid></UserControl>I'm getting "A first chance exception of type 'System.NullReferenceException' occurred in Telerik.Windows.Data", whilst it worked fine with a previous release. I got it working by binding the data once the async operation had completed, but I would prefer just to have it in the XAML like it worked before.
Workaround:
Remove GroupDescriptor XAML, and instead add handler for datasource "LoadedData" event. Manually add the GroupDescriptor in the codebehind:
private void FooBarDomainDataSource_LoadedData(object sender, LoadedDataEventArgs e) { FooBarDataGrid.GroupDescriptors.Add(new GroupDescriptor { Member = "Foo", SortDirection = ListSortDirection.Ascending }); }I have a working solution available for download here: RadControlsGroupDescriptorAsync.zip
