I do not wish for the field chooser dialog appearance to be inherited from the grid. I thought if I set SyncLookWithSourceGrid to false in the event BeforeColumnChooserDisplayed it would fix the issue and just display the columns without any formatting. It did not fix the issue. I do not want any formatting in the field chooser dialog. I just want the columns displayed. Right now because the grid header text is bold so are the columns in the field chooser dialog. If the header column is disabled so is the text in the field chooser dialog. In this particular case I cannot create my own field chooser like I do with most of the grids. This one has to be generic.
Can I modify the header appearance just for the field chooser dialog or will it also change the grid? Is there a better way to fix this issue?
Hello Michael,
Thank you for your post. If you read the documentation for the property, it says: "Specifies whether to apply appearance of the source grid to the column chooser."
The key here is that this property applies to the appearance of the grid, not to the individual header appearances. This means it copies the UseOsThemes, HeaderStyle, and Appearance from the grid's Layout. It does not apply to the individual appearances of the column headers.
So there is currently no way to turn these appearances off in the ColumnChooser. That should be submitted as a feature request.
Although you can set the appearance of the column chooser itself like explained here in the post:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/74963/column-chooser-columns-backgrounds-are-different/380495?gasource=(direct)&gamedium=(none)&gacampaign=(not%20set)&gaterm=&gagclid=
or this:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/2626/customising-column-chooser-grid-appearance
You can also refer to my test sample.
ColumnChooser_DrawFilter.zip
Okay. I implemented the ColumnChooserDrawFilter in the zip file. It would probably work except the Element in DrawElement method is never HeaderUIElement. It is either CheckEditorCheckBoxUIElement or UltraGridUIElement. So the code to change back color never executes.
I thought I would also mention that setting the property below in BeforeColumnChooserDisplayed fixes the display of disabled header columns in the field chooser. In other words the text is no longer greyed out. Setting Bold to false did not. I guess I expected neither of these changes to work.
Worked.
e.Dialog.ColumnChooserControl.DisplayLayout.Appearance.ForeColorDisabled = SystemColors.ControlText;
Did not work or at least did not fix the text being bold. Probably because it is already false.
e.Dialog.ColumnChooserControl.DisplayLayout.Appearance.FontData.Bold = DefaultableBoolean.False;
In the post i shared earlier Mike Saltsman the deveper of the grid explained that the headers draw as headers. They pick up their appearances from the actual headers in the grid. So if you have se t the grid header bold its gonna be bold in the columnChooser as well .
The ColumnChooser just askes the grid to paint the header for it so that it always looks exactly the same in the column chooser as it does in the real grid. So I doubt that any appearance setting on the ColumnChooserControl will affect them.
Hello MIchael,
Yes you are right it should be documented . But for now Customizing Column Chooser grid appearance is something never implemented so it’s a new feature idea for the grid which you can suggest at http://ideas.infragistics.com.You can suggest new product ideas for future versions by emailing ideas@infragistics.com.
Submitting your idea will send it directly to our product management team .Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
Also if zip file sample is not working for you then refer the sample code from this post (Mike’s last update in this post )and modify as per your requirement.
Yes I am aware of that. Says the same thing in the documentation. Not to mention it is rather obvious when the only appearance that I have set to bold is the header. The header for some columns is set to disabled which is why Filler was greyed out. Still does not explain why I can change the color of the font but not the bold. It also doesn't explain why the zip file example does not work.