Click here to Skip to main content
15,890,186 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
The code hereunder is failing to sort the reg_id. Should I do something in code-behind.
Can anyone guide me?

XML
<asp:GridView ID="GridView2" runat="server" AllowSorting="true">
    <asp:BoundField DataField="reg_id" HeaderText="reg_id"
                    SortExpression="reg_id" />
   </asp:GridView>



Thanks.
Posted
Comments
_Amy 9-May-13 2:41am    
Not much informative. So, it's "Not a question".
What is the error you are getting? Where you stuck? Used google or not?
Try improving your question by clicking on "Improve Question" button.

--Amit

1 solution

XML
<asp:gridview id="GridView2" runat="server" allowsorting="true" >
  <columns>
    <asp:boundfield datafield="reg_id" headertext="reg_id" sortexpression="reg_id" />
  </columns>
   </asp:gridview>
 
Share this answer
 
v2
Comments
S.Rajendran from Coimbatore 9-May-13 3:21am    
'Columns' .No, it is still not working.
KM Perumal 9-May-13 3:53am    
did u get any error
S.Rajendran from Coimbatore 9-May-13 5:36am    
No err is coming but it is not getting sorted.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900