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
750
DisplayLayout.Load(..) resetting grid
posted

Hi!

I'm using the following functions to save and load filters:

        private const PropertyCategories CategoriesToSave = PropertyCategories.ColumnFilters;
 
        public override void AdditionalSave(Control x, string path) {
            var g = x as UltraGrid;
            var layout = g.DisplayLayout;
            var newpath = string.Format("{0}{1}_gridProps.lyt", path, g.Name);
            layout.Save(newpath, CategoriesToSave);
        }
 
        public override bool AdditionalLoad(Control x, string path) {
            bool ret = true;
            var g = x as UltraGrid;
            var layout = g.DisplayLayout;
            var newpath = string.Format("{0}{1}_gridProps.lyt", path, g.Name);
            if (File.Exists(newpath)) {
                layout.Load(newpath, CategoriesToSave);
            }
            return ret;
        }

The Load of the grid resets the other properties of the grid (for example ExcludeFromColumnChooser). This is not desirable in my situation. I was fully expecting the loading of filters to be merely additive with no other impact on the grid. Can you explain how I can achieve this?

Thanks!

Craig
Parents Reply Children
No Data