Persistence Framework with Multiple RadGridview

3 posts, 0 answers
  1. Aamir
    Aamir avatar
    2 posts
    Member since:
    Sep 2011

    Posted 15 Nov 2011 Link to this post

    GridViewSerialization example works fine as long as we have 1 gridView .In my case , i have TreeView and each treeviewitem is having
    one gridview. Its something like that :

     <telerik:RadGridView x:Name="RadGridView1"  telerik:PersistenceManager.StorageId="RadGridView1".
    <telerik:RadGridView x:Name="RadGridView2"  telerik:PersistenceManager.StorageId="RadGridView2".
    <telerik:RadGridView x:Name="RadGridView3"  telerik:PersistenceManager.StorageId="RadGridView3".


    After Saving Sorting on each grid , when i try to load then it gives me "null exception" for column . If you can extend your example of 
    GridViewSerialization with multiple gridview then you can reproduce this issue.
  2. Aamir
    Aamir avatar
    2 posts
    Member since:
    Sep 2011

    Posted 15 Nov 2011 Link to this post

    I think i solved it by using if (column != null).

      if (column != null)
                        {
                            gridView.SortDescriptors.Add(new ColumnSortDescriptor() { Column = column, SortDirection = proxy.SortDirection });
                        }
  3. DevCraft banner
  4. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 16 Nov 2011 Link to this post

    Hi Aamir,

    It seems that when loading, the saved column info cannot resolve its actual column in the GridView. It could be that the columns of the GridView have not already loaded or the column does not exist in the GridView. You can troubleshoot this with the custom provider class and check whether all of the GridView columns are loaded when the sort descriptors are being restored.

    Kind regards,
    Alex Fidanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top