Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have databound a dropdown, i need to sort it.
I cannot change the way the values are getting populated inside the dropdown, I have to sort it after the values are populated inside the it.
Posted
Comments
Thanks7872 6-Sep-13 7:08am    
I cannot change the way the values are getting populated inside the dropdown

Why?
write2varun 6-Sep-13 7:11am    
Thanks for the quick reply
it is getting populated using some other components in the application which is getting populated using the database
Thanks7872 6-Sep-13 7:14am    
So what? Does this mean that you don't know from where the data comes?
Mike Meinz 6-Sep-13 7:11am    
If it is DataBound, why can't you put an Order By clause on the Select statement?
write2varun 6-Sep-13 7:12am    
it is not possible that is the problem. i cant use order by

i think this could help you:

Sorting Dropdown list in ASP.NET using C#[^]
 
Share this answer
 
Maybe this could help you out:

Sort DropDownList
 
Share this answer
 
Thanks for the solution Ali[^]

Thanks for the reply Christopher Kenis[^]
 
Share this answer
 

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