Hi,
The built-in column chooser displays column names alphabetically. I want my application users to be able to use the drag and drop capability in the column chooser, so that they can reorganize ultragrid column display order from that grid.
To achieve this, two things must be done:
- the column names must appear in the same display order than in the ultragrid band
- I need to handle some drag and drop event of the column chooser ultragrid. I analyzed column chooser component and seen that it is composed of 3 main controls : a ColumnChooserDialog, an UltraGridColumnChooser and a ColumnChooserGrid. Unfortunatelly, I could not catch any drag and drop event of those controls. Is there some properties to set to be able to handle these events?
If this cannot be done, I could implement my own column chooser component, but in this case, there is much more work to do than using to built-in one.
Thanks in advance.
It depends what you mean by "customize" exactly, and where the column chooser is coming from. There's a ColumnChooser dialog built-in to the grid. But you don't have to use it. You can place ColumnChooser control on the form or on your own dialog and set properties on it and display it however and whenever you like.
Hi, I want to customize column choser control, can I customize it.
To control the order of the columns, you can do this:
private void ultraGrid1_BeforeColumnChooserDisplayed(object sender, BeforeColumnChooserDisplayedEventArgs e) { e.Dialog.ColumnChooserControl.ColumnDisplayOrder = ColumnDisplayOrder.SameAsGrid; }
There is no way to catch the dragging and dropping of items in the ColumnChooser, though.