Infragistics UltraGrid Column Header Captions

Infragistics UltraGrid Column Header Captions

Old forum URL: forums.lhotka.net/forums/t/3003.aspx


closl posted on Thursday, June 07, 2007

When using a collection to fill Infragistics UltraGrid, does anyone know how to pre-determine which fields show up in the UltraGrid, besides spinning through all the columns and manually hiding the unwanted?  Does Infragistics display members that are public?

Thank You!

jgk1701 replied on Thursday, June 07, 2007

closl:

When using a collection to fill Infragistics UltraGrid, does anyone know how to pre-determine which fields show up in the UltraGrid, besides spinning through all the columns and manually hiding the unwanted?  Does Infragistics display members that are public?

Thank You!

Decorate the properties that you want hidden with the Browsable(False) attribute.  That is what works for me.

Jeff

closl replied on Tuesday, June 12, 2007

Thanks very much!  sorry it took so long to post back.

jgk1701 replied on Wednesday, June 13, 2007

Glad to be of help.  I am still somewhat of a newbie to CSLA, so my ability to help other users is limited.

Jeff

dshafer replied on Thursday, June 14, 2007

Another solution would be to "build" your grids in code.  I know this sounds like a pain, but I've had problems with grids that were setup using the UltraGrid designer bound to a bindingsource.  Specifically, when you add a new property to the business object, it is automagically added to the grid, and if I remember correctly, the order of the columns in the grid is also jumbled.  I created a base grid class that inherited from the ultra grid and added some "helper" methods that would make building the grids in code less of a struggle.  Specifically I call a setup method with an ordered ArrayList of the columns/properties that I want to be visible in the grid, and all others have visible set to false.  This base class is also a nice place to add helper methods for setting up columns that will be using the ultradropdown.

Dustin

Copyright (c) Marimer LLC