how to sort the gridview ?

Posted by Anilkumar431 under ASP.NET on 1/3/2013 | Points: 10 | Views : 720 | Status : [Member] | Replies : 1
hi all,
i need to fill and sort the gridview control in my app..
i have 3 radiobuttons in my app like dept,empcode,reporter.
if i click on dept radiobutton the gridview should be come with sorting order...
same for rest of 2 radiobuttons also..
please help me...




Responses

Posted by: .Netlearner on: 1/7/2013 [Member] Starter | Points: 25

Up
0
Down
Hello,

On Radiobutton event you can create a sql query according to which you want the gridview need to be filled. For eg.

rb1_OnChecked()
{
string selectedvalue=rb1.text;
SqlQuery=select * from tbl orderby selectedvalue;
}


i have writtern a rough code u can either use radiobuttonlist and use OnChanged function.
Hope you got some idea.
If Helps mark this as answer

Anilkumar431, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response