Click here to Skip to main content
15,905,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All,

In Web Page Contain: Dropdownlist(high to low, low to high, recently)
gridview control(Title, Description,Amount,Date)

here once click high to low in dropdownlist control automatically diaplay in high to low(date) cars details

this process is possible or not and any logic or url paths and examples please reply me
Posted
Comments
Ankur\m/ 24-Feb-14 4:37am    
you gotta post user's selection, sort your Data View that you are binding your GridView control to and rebind. Done!
These days sorting is done on client side using jQuery as well. Google for it and you will find a lot of examples.

1 solution

It is possible. Use selectedindexchanged Event for this.

see this:
http://asp-net-example.blogspot.in/2009/03/how-to-use-dropdownlist.html[^]
http://forums.asp.net/t/1069559.aspx[^]
 
Share this answer
 
v2
Comments
member1431 24-Feb-14 5:02am    
here M selecting location display location related details but ascending and descending and recently ads how

here write code for cities

switch (ddlCities.SelectedValue)
{
case "Hyderabad":
cmd.CommandText="Select * From products where city='Hyderabad'";
break;
case "Vishakapatnam":
cmd.CommandText="select * from products where city='Vishakapatnam'";
break;
default:
break;
}

cities above code ok
but ascending and descending , recently how please reply me logic please jas
Tom Marvolo Riddle 24-Feb-14 5:06am    
Try this: Select * From products where city='Hyderabad order by columname asc
member1431 24-Feb-14 5:09am    
Thank you jas thank you so much
Tom Marvolo Riddle 24-Feb-14 5:10am    
you are welcome!
member1431 24-Feb-14 5:35am    
jas

am already saturday asked one question like add to cart remember

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