Below is the code in declarative format i need to dynamically build the radgrid and perform grouping. I am new to telerik so please could you help me out to convert it for code behind.
| <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceI="SqlDataSource1" |
| GridLines="None" |
| AllowPaging="false" PageSize="25" |
| Skin="Outlook" DataSourceID="SqlDataSource1"> |
| <MasterTableView DataSourceID="SqlDataSource1" GroupsDefaultExpanded="false" > |
| <GroupByExpressions > |
| <telerik:GridGroupByExpression > |
| <SelectFields> |
| <telerik:GridGroupByField |
| FieldName="name" HeaderText=""/> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField |
| FieldName="name" /> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| <telerik:GridGroupByExpression > |
| <SelectFields> |
| <telerik:GridGroupByField |
| FieldName="lft" HeaderText=""/> |
| </SelectFields> |
| <GroupByFields> |
| <telerik:GridGroupByField |
| FieldName="lft" /> |
| </GroupByFields> |
| </telerik:GridGroupByExpression> |
| </GroupByExpressions> |
| </MasterTableView> |
| </telerik:RadGrid> |