views:

413

answers:

2

I am using combobox which contains three value-NSW,TIC,VIA. in page load i m setting selectedindex = 1 for the combobx , the value shown as TIC which is correct but it is not getting highlighted. I can see that when user selects different value (i mean the index gets change for combobox from UI) then the particular text gets highlighted, but it doesn't happen when we change the index through progammatically(c# code). ComboboxStyle is DropDown. Can someboy let me know wat could be the reason?

A: 

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

Peter van der Heijden
A: 

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

xpda