sorting in grid

2 posts, 0 answers
  1. Harry
    Harry avatar
    27 posts
    Member since:
    Mar 2009

    Posted 31 Dec 2009 Link to this post

    Hello..
    i applied sorting on Rad Grid using this Code

     <himani:HimaniGrid ID="HimaniGrid1" runat="server" AllowPaging="True"
                        AllowSorting="True" GridLines="None" AutoGenerateColumn="False">
                     
                     <MasterTableView AllowMultiColumnSorting="false" AllowNaturalSort="true"
                            cellspacing="-1"/>
                <SortingSettings SortedBackColor="Azure" EnableSkinSortStyles="false" />
                <HeaderStyle Width="100px" />

                    </himani:HimaniGrid>
    i m using link Button in Item Template...
    its apply sorting on all Columns but not on link button column..
    i also want to apply  sorting on link button Column...
     i m using basic sorting
    link is given below
    http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/sorting/defaultcs.aspx
    plz reply.....

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 31 Dec 2009 Link to this post

    Hello,

    Try setting the SortExpression for the TemplateColumn and see whether it is working as expected.

    ASPX:
     
     <telerik:GridTemplateColumn HeaderText="ProductName" SortExpression="ProductName"
                <ItemTemplate>                            
                    <asp:LinkButton ID="LinkButton1" Text='<%#Eval("ProductName") %>' runat="server"></asp:LinkButton> 
                </ItemTemplate> 
    </telerik:GridTemplateColumn> 

    Thanks,
    Princy.
Back to Top