I am binding a grid to a bindablelist of my objects. I am using an ultradatasource to set the columns that I want to appear. On one grid, the columns are correct and the column chooser is correct. However, on another grid, the columns are correct, but the column chooser has unwanted columns marked as hidden, which the user can unhide.
I am using the true flag during binding to hide new columns, as well as setting the new column behavior to hide.
What must I be doing to allow these columns to appear in the column chooser?
Hiding a column in the grid doesn't automatically hide it from the ColumnChooser. If it did, then once a user hid a column, they would never be able to show it again.
What you can do is handle the InitializeLayout event of the grid and loop through the columns. Any columns that are already hidden at that point, you should set ExcludeFromColumnChooser to True.
Thanks. Someone had coded that, but of course you have to bind the data before you call that routine, and I had not consistently done so. It was difficult to find, as I was under the impression that I had improperly designed the datasource. Thanks again!