Problem with combobox

Posted by Mahesh_Chs under C# on 9/17/2012 | Points: 10 | Views : 2095 | Status : [Member] | Replies : 7
hi,

i have a combobox with the list of cities, and i dont want to clear the text in the combobox(means if i select Hyderabad and if i use back space then it is clearing the combobox ) how can i rectify


Thanking you
mahesh




Responses

Posted by: Jayakumars on: 9/17/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

can u clearly explain your requirement normally backspace not allow dropdownlist.

Mark as Answer if its helpful to you

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

Posted by: Mahesh_Chs on: 9/17/2012 [Member] Starter | Points: 25

Up
0
Down
hii.

In general combobox is the combination of textbox and a dropdownlist right, i dont want that textbox..
i want the control like dropdownlist in the windows applications

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

Posted by: Pgayath on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
Mahesh:

Set the combo box's "DropDownStyle" to "DropDownList" . By default it will be "DropDown"

Hope this helps.

Thanks and Regards,
Gayathri P


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

Posted by: Vikash on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
Hi Mahesh_Chs
this is working fine in my code .....Plz will u give me code?

Regards,
Vikash Pathak

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

Posted by: Krishnamanohar on: 10/11/2012 [Member] Starter | Points: 25

Up
0
Down
Hi
i Have also face this Problem .
for that sol is change the DropdownStyle Property to DropdownList
Regards,
Krishna Manohar

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

Posted by: Pgayath on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down
Mahesh_Chs please "Mark as Answer" so that it will help others

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

Posted by: Mahesh_Chs on: 10/12/2012 [Member] Starter | Points: 25

Up
0
Down
hii

this.combobox1.DropDownStyle = ComboBoxStyle.DropDownList;

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

Login to post response