Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Save and load ultragrid layouts
posted

Hi,

I have a problem by saving and loading layouts of a hierarchical ultragrid.
I set a filter in a child band and save the layout with
        grid.DisplayLayout.Save(layoutStream, PropertyCategories.All)
When I try to load this layout again with
        grid.DisplayLayout.Load(layoutStream, PropertyCategories.All)
the filter doesn't appear.
Is there a possibilitiy to save filters of child bands?

(You can reconstruct this in your samples "WinGrid - Samples Explorer - Loading and saving layouts":
First you have to allow RowFiltering. Then set some filter in the second band of the left grid (for example quantity = 1).  After pressing "Swap" the filter has to appear on the right grid - but it doesn't)

I hope you understand my problem and can help me.

Thanks
Julia

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Julia,

    Are other settings getting loaded properly? If you change the width or position of a column, does that load properly?

    If no settings are loaded properly, then my guess is that you are loading the layout into a grid whose data structure is different from the one you save. The bands and columns have to be exactly the same in order to load a layout.

    Another possibility is that this is a bug that was recently fixed and you should get the latest service release to correct the issue.

    If the column widths and positions are working okay and it's just the filters, then my guess is that this has to do with the RowFilterMode. If RowFilterMode is set up to filter all the rows in a particular band, then that's okay. But if it is set up to filter each rows collection separately, then the filters cannot be saved, because they are dependent on the data and are not part of the layout.

Reply Children