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

sorting in grid

1 Answer 41 Views
Input
This is a migrated thread and some comments may be shown as answers.
Harry
Top achievements
Rank 1
Harry asked on 31 Dec 2009, 09:07 AM

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.....

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Dec 2009, 09:52 AM
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.
Tags
Input
Asked by
Harry
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or