When I am using an UltraGrid control, I am saving our default settings inside of an UltraGridLayout object, and I would like to have the ability to go back to these settings on the fly. So when a user moves around columns, hides columns, ect. when they invoke a reset of the settings I would like to go back to what is saved in the UltraGridLayout object.
I am currently invoking the DisplayLayout.Load method as follows to reset the settings:
myGrid.DisplayLayout.Load(_defaultSettings, PropertyCategories.All);
This does reset the settings on the grid if I were to close the form and reopen it, but it does not update the grid on the fly. Is this the right method to be using, or is there another way of doing this?
I think you have to call DisplayLayout.CopyFrom if you are loading a layout from another layout. The Load methods doesn't take a layout, it takes a stream - unless thre's a new overload I am unaware of.
I tried the CopyFrom method instead of Load, and it seems to work the same way where it is not reseting the grid on the fly. When I close my form and reopen it, it will show the default settings after a CopyFrom.
I am using NetAdvantage for .NET 2008 Vol 1 CLR 2.0 if that does make a difference.
travisnation said:Is there an update to this issue? We are experiencing the same thing.
Do you have the latest service release? I am pretty sure this issue is already fixed.
If you are experiencing a problem with the latest service release, then you should Submit an incident to Infragistics Developer Support
Is there an update to this issue? We are experiencing the same thing.
I installed the service release 2023, but the behavior still exists. I have opened a Support Request to investigate the issue. Thanks for your assistance.
somay said:Did you try calling UltraGrid1.SuspendLayout() function before doing your operation and then UltraGrid1.ResumeLayout() after your operation? I hope this will solve your problem.
SuspendLayout and ResumeLayout have nothing at all to do with the DisplayLayout on the grid. These are methods on Control and they deal with the layout of child controls within a control.
Did you try calling UltraGrid1.SuspendLayout() function before doing your operation and then UltraGrid1.ResumeLayout() after your operation? I hope this will solve your problem.