Saving layout does not work properly when the gridview contains a GridViewToggleRowDetailsColumn

2 posts, 0 answers
  1. Nicole
    Nicole avatar
    25 posts
    Member since:
    Nov 2010

    Posted 26 Jun 2014 Link to this post

    Hi team,

    I've got a problem with the PersistanceManager. I'm using the routines from the demo for saving and loading the layout of the gridview. The data is saved in the isolated storarge. My gridview contains a GridViewToggleRowDetailsColumn.

    When I start the application, don't change the layout, save the layout, restart the application and load the layout from the isolated storage the displayindex is deferred. When I remove the GridViewToggleRowDetailsColumn, save and load works fine.

    <telerik:GridViewToggleRowDetailsColumn Header="+" HeaderTextAlignment="Center" x:Name="MainToggleColumn"/>

    Please take a look at the attached screenshots. The first one (hc_110.jpg) displays the layout before saving. The second one (hc_111.jpg) displays the layout after restarting the application and loading the layout.

    Do you have an idea how to find a solution for this?


    Best regards


  2. Yoan
    Admin
    Yoan avatar
    1214 posts

    Posted 30 Jun 2014 Link to this post

    Hi,

    I guess that your are using the GridViewCustomPropertyProvider from this online demo. If so, you need to exclude the GridViewToggleRowDetailsColumn from the columns collection like so:
    case "Columns":
                      {
                          List<ColumnProxy> columnProxies = new List<ColumnProxy>();
      
                          //   var columns = gridView.Columns.Where(x => x is GridViewColumn);
      
                          foreach (var column in gridView.Columns)
                          {
                              if (!(column is GridViewToggleRowDetailsColumn))
                              {
                                  columnProxies.Add(new ColumnProxy()
                                  {
                                      UniqueName = column.UniqueName,
                                      Header = column.Header.ToString(),
                                      DisplayOrder = column.DisplayIndex,
                                      Width = column.Width,
                                  });
                              }


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