I''m trying to change the group captiontext to show a couple other column values on that line. so far all i could do was concatenate the fields in the sql and group by that new column. I''m wondering if there is a better way?
ADAdministrator Syncfusion Team March 9, 2004 07:09 PM
you can override the contents of any cell in the grouping grid by handling the GridGroupingControl.QueryCellStyleInfo event.
Check for e.Style.TableCellIdentity.TableCellType == GridTableCellType.CaptionCell and then assign the text you want to display in the cell as e.Style.Text.
ADAdministrator Syncfusion Team March 10, 2004 06:35 AM
so now how do i retreive some data from a couple columns under each group to put in the caption?
ADAdministrator Syncfusion Team March 10, 2004 06:50 AM
also, once i''m in the QueryCellStyleInfo event, can you see what the grouping field is?
ADAdministrator Syncfusion Team March 10, 2004 06:58 AM
ok, i found e.style.tablecellidentity.groupedcolumn.name for that last question.
ADAdministrator Syncfusion Team March 10, 2004 07:06 AM
the rowcount might be nice also.
ADAdministrator Syncfusion Team March 10, 2004 07:17 AM
i guess i can use e.style.text to get the recordcount right next to "items". is there another way?
ADAdministrator Syncfusion Team March 10, 2004 08:54 AM
The style identity object has a DisplayElement property (which should be a CaptionRow element in your case). You can get the group that is displayed in that caption with the .ParentGroup property.
This Group then offers a couple of methods, e.g. GetFilteredRecordCount() will return the number of records in that group. CategoryKeys returns the keys for this category and GetChildCount() returns "Items count" property.
In the GroupCustomers sample you can hover the mouse over the cells and a tooltip will display the DisplayElement kind for various cells and some more information found in the style identity objects for cells.
ADAdministrator Syncfusion Team March 10, 2004 10:56 AM