WPF how to give default combo box control display"----Select Item---" [Resolved]

Posted by Joewilliam under WPF on 6/15/2011 | Points: 10 | Views : 7828 | Status : [Member] | Replies : 5
WPF how to give default combo box control display"----Select Item---"

William Mary


Responses

Posted by: Ndebata on: 6/15/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
After binding the data
cmbSample.Items.Insert(0, "--Select--");

cmbSample.SelectedIndex = 0;

Thanks,
Debata

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

Posted by: Naimishforu on: 6/15/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
I think that's the good solution, instead of providing some text property.

Thanks
Naimish
http://naimishpandya.wordpress.com/

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

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

Posted by: Joewilliam on: 6/15/2011 [Member] Starter | Points: 25

Up
0
Down
Could you post some real time project sample using WPF(WPF desktop application)

William Mary

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

Posted by: Joewilliam on: 6/15/2011 [Member] Starter | Points: 25

Up
0
Down
could u give some sample for Mdicontainer window (containing child)

William Mary

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

Posted by: Joewilliam on: 6/15/2011 [Member] Starter | Points: 25

Up
0
Down
Thank you lot.

William Mary

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

Login to post response