Hi,
is there a way to set a custom column order in the UltraGridColumnChooser?
We want to show the original display layout (which we backup before applying a new one).
Thanks,Michael
Hi Michael,
The InitializeLayout event should be attached on the ColumnChooser’s dialog child control which is of type UltraGrid. This is the default inner control that is used for displaying ColumnChooser’s content.
You can find more details in the attached sample application of my previous post. Please let me know if have any additional questions.
I use the UltraGridColumnChooser control. How to attach to the InitializeLayout event here?
Thank you for posting in our forums!
As you already noticed, by default the ColumnChooser displays UltraGrid’s columns alphabetically. In order to change this behavior, you can follow the next steps.
Before column chooser dialog is displayed it adds an UltraGrid to its child controls. The way to access this UltraGrid is via handling BeforeColumnChooserDispayed event handler on your primary UltraGrid. Once you get ColumnChooser’s UltraGrid you can handle InitializeLayout event handler and then figure out how to customize the order of rows and columns.
For further reference, take a look at the attached sample application and let me know if it matches your requirements.