This is a migrated thread and some comments may be shown as answers.

RadGrid multi level grouping

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michelle Tan
Top achievements
Rank 1
Michelle Tan asked on 28 Dec 2012, 09:38 AM
Hi guys, Refer to the http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/grouploadmodeclient/defaultvb.aspx?#qsf-demo-source,
it allow column to drag and drop to group and ungroup. In my case, I do not want drag and drop, I want to group the country and city column at the page load. How do I achieved that. Please help. thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Dec 2012, 09:47 AM
Hi,

Try the following code.
aspx:
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1">
  <MasterTableView">
    <GroupByExpressions>
      <telerik:GridGroupByExpression>
        <SelectFields>
          <telerik:GridGroupByField FieldName="UnitPrice" HeaderText="Price" />
       </SelectFields>
    <GroupByFields>
          <telerik:GridGroupByField FieldName="UnitPrice" />
    </GroupByFields>
  </telerik:GridGroupByExpression>
    </GroupByExpressions>
  </MasterTableView>
<GroupingSettings ShowUnGroupButton="false"></GroupingSettings>
</telerik:RadGrid>

Thanks,
Princy.
Tags
Grid
Asked by
Michelle Tan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or