Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
355
Column chooser [incorrectly] showing ALL columns
posted

I am using the "built in" column chooser.

I catch the BeforeColumnChooserDisplayed event and do the following:

e.Dialog.ColumnChooserControl.MultipleBandSupport = MultipleBandSupport.SingleBandOnly;
e.Dialog.ColumnChooserControl.Style = ColumnChooserStyle.AllColumnsWithCheckBoxes;
e.Dialog.ColumnChooserControl.SyncLookWithSourceGrid = true;
e.Dialog.ColumnChooserControl.DisplayLayout.Appearance.BackColor = SystemColors.Window;
e.Dialog.ColumnChooserControl.ColumnDisplayOrder = ColumnDisplayOrder.SameAsGrid;
e.Dialog.DisposeOnClose = DefaultableBoolean.True;

The column chooser pops up fine.

However - it is showing EVERY SINGLE COLUMN in my grid - even those marked as ExcludeFromColumnChooser.True. If I inspect the grid's settings, the values seem to be correctly preserved (grid.DisplayLayout.Bands[0].Columns[...].ExcludeFromColumnChooser or if I stop in the even handler and look at e.Dialog.ColumnChooserControl.

  • 469350
    Offline posted

    Hi,

    I tested this out with the code you have here and it works just fine for me. I'm attaching my sample project here so you can see if it works on your machine. If it does not, then perhaps this is a bug in the version of the controls you are using and you just need to get the latest service release.

    How to get the latest service release - Infragistics Community

    If my sample does work for you, then something else in your application must be causing the ExcludeFromColumnChooser property to get reset or else maybe there is some conflicting setting being applied somewhere else in your code.

    WindowsFormsApplication24.zip