I have a webdropdown with three items in the list. ALL of them are set to selected="false" but when the webform displays, the first one in the list is always selected.
On Page_Load, the selectedindex is -1 as expected, but somewhere in between that and the form displaying it is selecting it for some reason, what's going on?
I know this isnt the best solution for the problem but I add an empty item in the drop down
cmbDropDown.Items.Insert(0, New DropDownItem("", ""))
No such option available. Plz tell some other solution.
You can try setting AutoSelectOnMatch = false
Thanks,
Angel
Tsvetelina,
Well that explains my problem (I posted down a few from this). I was having the same issue; clearing all the selected items, but it always selecting the first item in the list. So I changed it to just a Drop Down rather than a list. True, it now doesn't select anything... BUT in the text for the control it is still showing the first line of text (i.e. the drop down shows the first selection in the list, but when I drop-down the list nothing is selected). I can erase the list and tab away, and it then looks fine (no text, nothing selected in the drop down).
Although this would work (I would really rather have a drop down list) I can make do with it IF we can figure out a way to blank out the text in the line when the form is displayed and nothing is selected. What do we have to do for this to work?
/Tom
Hello Scott,
Are you using DisplayMode="DropDownList" ?
In this case this is how the WebDropDown is supposed to work.
When the WebDropDown is in DropDownList mode the conrol behaves as the standard ASP DropDownList control
http://help.infragistics.com/NetAdvantage/ASPNET/2010.3?page=WebDropDown_Multi_mode_Display.html
You can assure that the <asp:DropDownList> will work in the same way.
Let me know if you need further assistance.