If you go to http://www.telerik.com/help/aspnet-ajax/grdbasicgrouping.html, it shows a graphic of a RadGrid with Supplier and Category grouping (first graphic). I need to do a similar two level grouping:
Top Level
Second Level
Data
Second Level
Data
Top Level
Second Level
Data
...
How do you do this programmatically (in C#)? I've gotten the first level to work, but can't get the second. See code snippet below.
Thanks,
Gary
Top Level
Second Level
Data
Second Level
Data
Top Level
Second Level
Data
...
How do you do this programmatically (in C#)? I've gotten the first level to work, but can't get the second. See code snippet below.
GridGroupByExpression expression = new GridGroupByExpression(); GridGroupByField gridGroupByField; MyGrid.DataSource = ds; // dataset |
gridGroupByField = new GridGroupByField(); |
gridGroupByField.FieldName = "TopLevel"; |
gridGroupByField.HeaderText = " "; |
gridGroupByField.HeaderValueSeparator = ""; |
gridGroupByField.FormatString = "<strong>{0}</strong>"; |
expression.SelectFields.Add( gridGroupByField ); |
gridGroupByField = new GridGroupByField(); |
gridGroupByField.FieldName = "TopLevel"; |
expression.GroupByFields.Add( gridGroupByField ); |
MyGrid.MasterTableView.GroupByExpressions.Add(expression); |
MyGrid.DataBind(); |
Thanks,
Gary