How do add default item after binding items in combo box in silverlight

Posted by Kannan1986 under Silverlight on 8/11/2010 | Views : 4782 | Status : [Member] | Replies : 1
Hi all,
How do add default item after binding items in combo box in silverlight.

For ex:
i want to add item "Select Item" in combo box after binding items from database




Responses

Posted by: Varshavmane on: 10/7/2010 [Member] Starter | Points: 25

Up
0
Down
hello,
You just have to do this:

YourClassObject objSelectItem = new YourClassObject();
objSelectItem.ID = "0";
objSelectItem.Name = "Select Item";
ComboBox1.Items.Insert(0,objSelectItem);


HTH.

Kannan1986, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response