hi!
Is there a chance to find out which columns in a grid have been loaded with the DisplayLayout.Load(MemoryStream ms) method and which columns have not?
Imagine the following situation:
Version 1 of the program:
select a,b from table
Columns in the Grid: A, B
The user saves this DisplayLayout
-------
Version 2 of the program:
select a,b,c from table
The user loads the existing DisplayLayout from the database.
Now, only columns A and B should be displayed and C should be hidden.
By default, all three columns are displayed in the grid - i want to hide column C. How can i find out that only A and B have a stored DisplayLayout?
Thank you in advance!
Regards,
Andi
Yes. Instead of loading the layout into the grid's DisplayLayout, create an UltraGridLayout variable and load the layout into that. You can then examine the columns and bands in the layout. If you decide to load the layout into the grid, you can load it directly from the variable, rather than loading it from a file again, by using grid.DisplayLayout.CopyFrom.
thank you Mike!
Thats the solution!