I am looking for a way to iterate the collection of column group fields in a band of the grid.
I create a GroupField and some bound data fields at runtime and add the GroupField to the column collection of the band of the grid like so:
whdgResource.Bands[0].Columns.Add(myGroupField);
This works fine and we see the multi-column header with the proper columns under it.
On postback I want to rebuild the grid and find out what multi-column headers (GroupFields) exist and possibily remove or alter them.
I don't see any property that I can use to get a collection of group fields off the column collection of the band, or off the band itself.
Could you please provide a code sample that shows how to iterate the multi-column headers of a band so I can access them or alter them.
Thanks for your help!
Hello Ronald, Thank you for using Infragistics forums. It has been some time since your post, however in case you still need assistance I would be glad to help. If you want to iterate throw GroupField collection, this is the way:
If there is anything else, regarding this issue, feel free to contact me.
Hi Ronald,
I'm just following up to see if you need any further assistance with this issue. If so let me know.
Hi Zdravko,
Thanks for following up.
I would have never discovered how to do this.
Casting the column to a GroupField is one thing, but then casting that to a GridFieldCollection is not something I would have come up with. Wow.
Thanks again,Ron
Hi Ron,
I'm glad that I have been helpful to you. If there is something else besides, do not hesitate to contact me at any time!