Text not getting selection in Combobox when selectedindex is changed with code

I am using a combobox that contains three values ​​- NSW, TIC, VIA. in page load i m setting selectedindex = 1 for combobx, the value shown as TIC is correct but not highlighted. I see that when the user selects a different value (I mean the index is getting the changes for the combobox from the UI), then the specific text is highlighted, but that doesn't happen when we change the index through progammatically (C # code). ComboboxStyle - DropDown. Can anyone explain to me what wat might be causing it?

0


a source to share


2 answers


Your combo box does not receive focus after setting the selected index. Set focus using the Focus () method.



0


a source


Make sure the combobox tabstop property is set to true. Otherwise, you won't see a choice.



0


a source







All Articles