grouping not happening when revisiting a page

3 posts, 0 answers
  1. jen
    jen avatar
    77 posts
    Member since:
    Jun 2009

    Posted 04 Jun 2014 Link to this post

    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:GroupDescriptor Member="Type" DisplayContent="{Binding Type}" />
                                    <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"  />

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

    Posted 04 Jun 2014 Link to this post


    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?

    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.
  3. jen
    jen avatar
    77 posts
    Member since:
    Jun 2009

    Posted 04 Jun 2014 Link to this post

    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.
Back to Top