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

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

1 Answer 79 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nicole
Top achievements
Rank 1
Nicole asked on 26 Jun 2014, 09:31 AM
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


1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 30 Jun 2014, 04:20 PM
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.
 
Tags
GridView
Asked by
Nicole
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or