SortOrder = "None" GroupByExpressions

Thread is closed for posting
2 posts, 0 answers
  1. Katie Arnott
    Katie Arnott avatar
    25 posts
    Member since:
    Dec 2009

    Posted 30 Mar 2011 Link to this post

    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
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 05 Apr 2011 Link to this post

    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
Back to Top