Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Every one ,

I have a DropDownList My Dropdown values are like this 2,4,1,3.
But This is not in Correct format na..,
for that's the reason i want to sort my dropdown values like 1,2,3,4.

How to do this any one can help me..

one thing my dropdownlist is with in the GridView controller.
Posted
Comments
[no name] 7-Aug-12 7:37am    
What is your environment?
Dose DropDownList DataBound or not?
_Amy 7-Aug-12 8:00am    
Re-post of Re-Arrange the DropDownValues[^]. Don't repost it. Try improving your previous question.

1 solution

 
Share this answer
 
Comments
[no name] 7-Aug-12 7:41am    
Thanks for ur response Ragunath ,

But i'm not using the LINQ ,I'm using SP
Currently my data is in ViewState.plz help me in this
Raghunatha_Reddy_S 7-Aug-12 7:48am    
There are two ways to do this
1) Sort the data in the viewstate before adding it to the dropdown list
2) http://www.codeproject.com/Articles/20131/Sorting-Dropdown-list-in-ASP-NET-using-C

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