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

Sorting is not happening

3 Answers 60 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Medac
Top achievements
Rank 1
Medac asked on 19 Feb 2009, 05:07 AM
Hi,

I have radgid, in that i have added asp:textbox control. When i sort the grid textbox are not getting sorted I mean it remains same and other columns will get sorted. Is it possible to sort textbox content also in the grid?


Thanks in advance,
Medac

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 19 Feb 2009, 08:51 AM
Hello Medac,

I hope you want to sort a TemplateColumn with a TextBox in its ItemTemplate. If so, try setting the SortExpression property for the TemplateColumn as shown below:
cs:
 <telerik:GridTemplateColumn SortExpression="ProductName" HeaderText="Product Name" > 
    <ItemTemplate> 
       <asp:TextBox ID="TextBox1" Text='<%#Bind("ProductName") %>' runat="server"></asp:TextBox> 
    </ItemTemplate> 
 </telerik:GridTemplateColumn> 

Thanks
Princy.
0
Medac
Top achievements
Rank 1
answered on 19 Feb 2009, 12:02 PM
Hi Prince,

I am binding the RadGrid in code behind. I tried giving SortExpression="Provider Number" where Provider Number is a column of datatable which i am binding for the radgrid {in code behind}......It didnt sort properly.... :(.... Any idea hw to fix this issue?

Regards,
Medac
0
Medac
Top achievements
Rank 1
answered on 02 Mar 2009, 08:02 AM
bump!!!
Tags
Grid
Asked by
Medac
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Medac
Top achievements
Rank 1
Share this question
or