This example demonstrates how to use group-by expressions in r.a.d.
grid
programmatically :
- Using the GridGroupByExpression and GridGroupByField classes
for specifying group-by expressions either as string or by
defining
- expression fields - name, alias
- display format
- aggregate functions
- Specifying group-by for each table in the hierarchical table
- Creating hierarchical grid with grouping at runtime from scratch - no
code in the ASPX
See the ASPX and C#/VB.NET tabs for details.
This example presents how to create the control and its structure dynamically on
PageLoad.
We follow the rules for structure object generation: columns or detail tables should be added to the corresponding collection
first
and then values for the properties of this instance should be set. Remember to check the condition
(Not IsPostBack) to avoid adding
the same structure objects to the grid twice. This is important because no ViewState is managed for the object before it has been added to
the corresponding collection.
Note that grouping/hierarchical structure is not supported with simple data-binding
(calling DataBind()). See the
Simple data binding demo from the
Populating with
data section for more info about the limitations of this binding mode.
Additional info concerning the grouping feature of the control you can find in the
Grouping
section from the online help:
Grouping