Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello All,

I want to update or order by the added items in Combobx.

Here is the code:

SQL
ListBoxItem lstItem = new ListBoxItem();
                    lstItem.Content = "Add1";
                 cmbName.Items.Add(lstItem);
                        
                   ;


Thanks
Posted
Comments
Varun Sareen 1-Mar-12 3:29am    
not clear
KIDYA 1-Mar-12 5:26am    
I have listboxItem which is binded to Combobox.

ListItems Contain data like
Add
Edit
Remove

if I remove 'Add' from list...n insert 'ABC' then in current scenario it will show list in combobox like this

Edit
remove
ABC

It should be like this:
ABC
Edit
remove

Windows Forms controls do not sort when they are data-bound

http://msdn.microsoft.com/en-us/library/kh56dwh6.aspx[^]
 
Share this answer
 
Got solution over here...

http://msdn.microsoft.com/en-us/library/w56d4y5z.aspx
 
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