Click here to Skip to main content
15,921,884 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
CAN you help me for sorting my combobox alphabeticaly by inserting items as runtime I have done my coding in C# .net and in sqlserver 2005.
Posted
Comments
shakil0304003 23-Oct-10 3:07am    
You should give your code.

select * from tablename order by items asc

Use It
 
Share this answer
 
use the below code after populate your combobox

MIDL
comboBox1.Items.Add("xxx");
           comboBox1.Items.Add("cxx");
           comboBox1.Items.Add("bxx");
           comboBox1.Items.Add("axx");
           comboBox1.Sorted = true;


Thanx
 
Share this answer
 
Example:

 _dataContext.Users.OrderBy(u => u.Name).ToList<user>();
</user>
 
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