Hi All,
Normally I don't have an issue with this but it appears not respect the option in the following situation.
When I load a layout in it may be from a previous version where the column was once visible. So what I do once the layout and datasource is assigned I loop through and hide/exclude certain columns after the layout is loaded which is after the datasource is assigned. Although it respects the hidden property it does not respect the ExcludeFromColumnChooser property. Is there something I am missing? Is there a refresh column chooser or something I need to call to make the grid respect it?
I know there was an issue in 2009? But I am on 12.2, so I thought that bug was fixed?
Alex
Hi Alex,
I'm not aware of any problems with this property. My guess is that your code is either not setting it to what you think you are setting it to, or else some other piece of code is changing the property after you set it.
Have you tried checking the property at run-time, like maybe in the BeforeColumnChooserDialog event of the grid to make sure it's still set to what you think it is?
Hi Mike,
Unfortunately it appears not to be my code, I have done what you suggested and added a msgbox to my "beforecolumnchooserdisplayed" event.
Private Sub ugrScenario_BeforeColumnChooserDisplayed(sender As System.Object, e As Infragistics.Win.UltraWinGrid.BeforeColumnChooserDisplayedEventArgs) Handles ugrScenario.BeforeColumnChooserDisplayed
e.Dialog.Text = "Field selector"
e.Dialog.Width = 400
e.Dialog.Height = 500
MsgBox(ugrScenario.DisplayLayout.Bands(0).Columns("IdIdent").ExcludeFromColumnChooser)
End Sub
This msgbox returns "1" and when I inspect "ugrScenario.DisplayLayout.Bands(0).Columns("IdIdent").ExcludeFromColumnChooser" it returns true yet is still shown in the column chooser.