This is a migrated thread and some comments may be shown as answers.

grouping not happening when revisiting a page

2 Answers 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
jen
Top achievements
Rank 1
jen asked on 04 Jun 2014, 02:30 PM
Hi there,
I have a RadGridView with one group descriptor on a page. First time visiting this page, items are added to the list and the grid displays them correctly, with the rows grouped correctly. If I leave this page and return to it, and the data has not changed, the grid shows the list not grouped.

I have turned the group panel visibility off and I am not displaying the column that is being grouped by. I don't want the users to change the grouping, I want the grouping to always be applied.

​ <telerik:RadGridView  ShowGroupPanel="False" AutoGenerateColumns="False" ItemsSource="{Binding Incentives}" EditTriggers="None"
                       IsReadOnly="True" IsFilteringAllowed="False" Margin="5" x:Name="grd_incentives">
                            <telerik:RadGridView.GroupDescriptors>
                                <telerik:GroupDescriptor Member="Type" DisplayContent="{Binding Type}" />
                            </telerik:RadGridView.GroupDescriptors>
                            <telerik:RadGridView.Columns>
                                <telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}" Width="*" MaxWidth="250"  />
                                <telerik:GridViewDataColumn Header="Bulletin Number" DataMemberBinding="{Binding BulletinNumber}" Width="115"  />
                                <telerik:GridViewDataColumn  Header="Special Instructions" DataMemberBinding="{Binding SpecialInstructions}" Width="250"  />
                            </telerik:RadGridView.Columns>
                        </telerik:RadGridView>


Is there something I can do to re-apply the grouping?
grd_incentives.Items.Refresh(); didn't help

2 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Jun 2014, 03:10 PM
Hello,

I am not able to reproduce such a problem neither locally nor on our online demos. You can test this yourself grouping by a column and then navigating between the different pages.

Would you please share how have you defined the paging? Have you defined it as explained in the Paging RadGridView online documentation?

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
jen
Top achievements
Rank 1
answered on 04 Jun 2014, 03:38 PM
I have figured out what's happening. When leaving this page the list the grid is bound to becomes null, which somehow causes the grid's groupDescriptors collection to change (action = refresh). I managed to catch and cancel that event, and now the group descriptor stays as I defined it in the xaml.
Tags
GridView
Asked by
jen
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
jen
Top achievements
Rank 1
Share this question
or