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

SortOrder = "None" GroupByExpressions

1 Answer 67 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Katie Arnott
Top achievements
Rank 1
Katie Arnott asked on 30 Mar 2011, 11:05 PM
I'm using the GroupByExpressions on the RadGrid, but I would not like my data to be sorted when bound. 

Here is my mock up:
<telerik:RadGrid ID="HeadCountRadGrid" runat="server" Skin="Sunset_Custom" GridLines="Both"
            AutoGenerateColumns="false" Width="100%" EnableEmbeddedSkins="false" AllowSorting="false"
            OnNeedDataSource="HeadCountRadGrid_OnNeedDataSource" >
    <MasterTableView BorderStyle="None" BorderWidth="0px" GroupsDefaultExpanded="true" GroupLoadMode="Client" >                       
        <GroupByExpressions>
            <telerik:GridGroupByExpression
                <SelectFields >
                    <telerik:GridGroupByField  FieldName="Section" HeaderValueSeparator=" " HeaderText=" " />
                 </SelectFields
                <GroupByFields>
                    <telerik:GridGroupByField  FieldName="Section" SortOrder="None"  />
                </GroupByFields>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <Columns>
            <telerik:GridBoundColumn DataField="Group" ItemStyle-HorizontalAlign="Right" HeaderText="" ItemStyle-Width="250" HeaderStyle-Width="270"/>
            <telerik:GridBoundColumn DataField="NumberOfStudents" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Center" HeaderText="Number of Students"  />
       </Columns>
    </MasterTableView>
    </telerik:RadGrid>


Thank you,

Katie

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 05 Apr 2011, 09:28 AM
Hi Katie,

To achieve the desired functionality you can handle the SortCommand event of the grid and there implement your logic. Find more information on custom grid sorting in the following resources:

http://www.telerik.com/help/aspnet-ajax/grdapplycustomsortcriteria.html
http://www.telerik.com/help/aspnet-ajax/grdsortingexpressions.html

I hope this gets you started properly.


Best wishes,
Maria Ilieva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Chart (Obsolete)
Asked by
Katie Arnott
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or