Hi all,
I have a grid that exists in 2 states (read-write and read-only). The user can toggle between these 2 at any time and the code needs to show/hide the editable columns based upon this event.
Currently, the code does this: Grid.DisplayLayout.Bands[ 0 ].Columns[ property.Name ].Hidden = !ReadWrite;
which "works" but seems to have some very strange layout behaviors. The columns will show-hide, but their position seems to shift and the remaining columns are also different widths after the operation. Is there anyway to get the columns to show-hide IN PLACE without affecting any other columns?
Thanks for your help,
bmm727 said:The columns will show-hide, but their position seems to shift and the remaining columns are also different widths after the operation.
Hi Vince,
Thanks for replying. I've attached 2 screen shots - the first, screen-A is the orignial state of the grid after loading a saved layout. The second, screen-B, is what the grid looks like after I've gone through 1 round of "Show read/write columns".
The read/write columns are {Comments, Order Quantity, Order Price, Duration, Dest} as indicated by the yellow-ish background. They are defaulted to visible, so in theory, setting the UltraGridColumn.Hidden flag (to true) on these rows shouldn't make any difference. However, as you can see in screen-B, they shift somewhat dramatically.
Thanks in advance,