I am manually adding sorted goups with the following code to a wingrid.
Band.SortedColumns.Add(Column, SortDescending, SortGroupBy)
SortDescending and SortGroupBy are booleans that are being set in code based upon data in the DB. When I create a 'Grouping' like this, how do I access the Header Row that is created. I need to set some of it's appearance properties(Backcolor, FontData, etc.)
Thanks for any advice...
Hi,
I'm pretty sure that the UltraGridGroupByRow has a Column property. Maybe it's GroupByColumn, I forget the exact name.
It also has a Value (which tells you the Value of the group) and a Description (which is the text to be displayed).
Is there a way in that row that you can tell what it is grouped by?
The app I am deveoping is a custom inquiry screen. My app reads data in a DB that is setup in another app. The other app is where the inquiries are defined. The user has a selection of views to choose from. After they select a view they can define what fields they want to see and how they want to group \ summarize the data. When they pick the fields they want to group on they can also pick what backcolor they want the header row to be. So for example they may be using a view that includes information for customer orders. When setting up this inquiry the user decided to group on Customer, then on Order, then Item. They set the Customer header rows to have a backcolor of blue, the Orders to be in yellow and the items to be red. Only the header group by rows, not the actual data rows. So when the InitializeGroupByRow event is raised, I need to know what column this row is a header of so that I can look into my datatable and see what backcolor I need to set it too.
Thanks again for any help.
The best place to do this is in the InitializeGroupByRow event of the grid. The event args will pass in the row.