We tried to get the grouping of the radgridview done in the XAML using the groupdescriptors with both options
For the information of the gridview look at the code we added.
1) Groupdescriptor with Member=”GemeenteList”
Errors we get
Object is not set to an instance of an object (“Inner exception” )
2) Columngroupdescripter with Column=”{Binding Column[\GemeenteList\], ElementName=SteekproefradGridView}”
Errors we get
Object is not set to an instance of an object (“Inner exception” )
Take in mind that we are binding the SteekproefradGridView immediately from the load operation, where we then divide the columns. So it is actually a direct binding to the entities of the stored procedure we did develop.
Where the problem starts to develop I think is that the entity gets loaded in a way that is not yet divided in the columns at the first start and therefore there is no column to compare to. This is what we achieved once or twice we get the rows and they still have numbers 7981, 8000 and so on, and within them you can find the data we need. Sadly we cannot reproduce this anymore.
So our questions would be:
1) Is it possible with our setup to group the radgridview in the XAML?
2) And If it is not possible how should we change the settings to get this to work?
a) By creating a class that holds all the information of the entities and then bind that class to the columns so that the data is immediately available
3) Is there possibly a work-around for this problem we are having?
This is the normal radgridview code we use:
<telerik:RadGridView HorizontalAlignment="Center" Margin="0" x:Name="SteekproefradGridView" VerticalAlignment="Top" IsFilteringAllowed="True" CanUserResizeColumns="False" CanUserReorderColumns="False" CanUserSortColumns="False" CanUserFreezeColumns="False" AutoGenerateColumns="False" CanUserDeleteRows="False" CanUserInsertRows="False" CanUserSelect="True" RowIndicatorVisibility="Collapsed" RowDetailsVisibilityMode="Visible" ShowColumnHeaders="True" ShowGroupPanel="True" MinWidth="200" ItemsSource="{Binding Source={StaticResource KlanttevredenheidViewModel}, Path=KlanttevredenheidDetailLoadop.AllEntities}" DataContext="{Binding Source={StaticResource KlanttevredenheidViewModel}}" ShowGroupFooters="True">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Gemeente" DataMemberBinding="{Binding GemeenteNaam}" UniqueName="GemeenteList" />
<telerik:GridViewDataColumn Header="Leverancier" DataMemberBinding="{Binding NaamLeverancier}" />
<telerik:GridViewDataColumn Header="Periode" DataMemberBinding="{Binding Periode}" />
<telerik:GridViewDataColumn Header="WaardeNaWeging" DataMemberBinding="{Binding WaardeNaWeging}" IsVisible="False" />
<telerik:GridViewDataColumn Header="WegingsFactor" DataMemberBinding="{Binding WegingsFactor}" IsVisible="False" />
<telerik:GridViewExpressionColumn Header="Cijfer" Expression="WaardeNaweging/Wegingsfactor" DataFormatString="{}{0:0.0}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
We hope that we can get an answer to the questions so we would be able to solve our problem.
Thanks in advanced for all your help!
Kind regards,
Ramon