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.
Hi,
If ExcludeFromColumnChooser is true inside that event and the column is still showing up in the column chooser, then something is clearly wrong. I've never heard of that happening before, though.
Can you post a small sample project demonstrating this occurring?
Oke, forget this question, I found out that UltraGrid1:DisplayLayout:SaveAsXml / UltraGrid1:DisplayLayout:LoadAsXml will save / load these properties as well, so testing with a program that load layout from a previous saved layout doesn't work.
Thanks, Koen
Any update on this issue ? I'm using Infragistics v14.2 and it still looks as if the Band's ExcludeFromColumnChooser always takes precedence over the column setting for ExcludeFromColumnChooser.
This way, I can never hide / exclude columns from the ColumnChooser while keeping the ability to use the ColumnChooser for other columns in the band.
So my experience with v14.2:
set Band's ExcludeFromColumnChooser to true -> no column of that band will be shown in the Column Chooser
set Band's ExcludeFromColumnChooser to false -> all columns of that band will be shown in the Column Chooser, also columns that have an individual ExcludeFromColumnChooser to true (these columns I would like to hide / exclude in the ColumnChooser)
Thanks,
Koen
I tried this out and I get the same behavior. This is wrong. The column setting should take precedence over the band, not the other way around. I'm going to ask Infragistics Developer Support to write this up as a bug for developer review.
EDIT: Now that I think about this some more, I think I see why it's working this way. If you set the Band's ExcludeFromColumnChooser to True and the Column's to false, you would expect the entire band not to display. So in that case, the band setting takes precedence. But in the case where ExcludeFromColumnChooser is false, which is the default, I think it makes more sense for it to work the other way.
The process of creating a sample was useful as I kept adding bits until I recreated the probem. I found the problem to be that I had set ExcludeFromColumnChooser for the Band to false at some point. This I guess overrides whatever is set on the columns so although the column is excluded it complete ignores that property. This was not what I thought that propery meant, I thought it was an override to display the column chooser not display the column chooser's columns, but now I know (unless its not suppose to do that?).
Anyway setting that to default solved the problem.