Hello, we have a column chooser on the grid. When select columns, some are mingled in the existing columns making it more difficult for a user to find the newly selected columns. I wonder how to have new columns selected by user always added to the end of the columns displayed. Thanks !
Hi,
I'm having a hard time understanding your question.
It sounds like you are saying that when the user clicks the checkbox on a column in the ColumnChooser, you want that column to always go to the end, instead of appearing where it was previously located.
If that's what you want, then I think it should be easy to accomplish by handling the BeforeColPosChanged event. Something like this:
private void ultraGrid1_BeforeColPosChanged(object sender, BeforeColPosChangedEventArgs e) { if (e.PosChanged == PosChanged.HiddenStateChanged) { foreach (Infragistics.Win.UltraWinGrid.ColumnHeader header in e.ColumnHeaders) { if (header.Column.Hidden == false) { header.VisiblePosition = 999; } } } }
I used 999 here, because I figure that will always be higher than the VisiblePosition on any of the other columns in the grid. But just to be safe, it might be better to loop through the existing columns in the grid and find the highest VisiblePosition and then add 1 to it. My code seemed to work okay in the brief testing I did, though.
Hi Mike,
I need an information about ColumnChooser. I need a checkbox in the header of the columnchooser to select all the columns or deselect all. Is it possible? I tried to the following code which i handled for a grid.
e.Layout.Bands(0).Columns(0).Header.CheckBoxVisibility = HeaderCheckBoxVisibility.WhenUsingCheckEditor
This is working in grid fine, but not not in column chooser. What i have to do? whether i am missing anything? Please guide me.
Hi Suresh,
There's is currently no support for this in the Column chooser, but it's a popular feature request. I encourage you to Submit a feature request to Infragistics.
Feature for each volume release are chosen in part based on the number of requests from customers. So the more people who ask for a feature, the more likely it is to get implemented. :)
I need a checkbox in the header of the columnchooser to select all the columns or deselect all. is it possible now?If it is possible can you please tell me that which property i will look for ?