Hi There
I have a webdropdown that is bound to a sql dataset to populate its items. When the dropdown is opened it will not select the first item in the list. If any other item is selected first then the initial item is reselected it will select OK. Code as follows:
<ig:WebDropDown ID="WebDropDownPrincipalID" runat="server" Width="150px" DropDownAnimationType="Linear" DropDownContainerHeight="0px" DropDownContainerMaxHeight="0px" DropDownContainerWidth="0px" StyleSetName="Trendy" onitemsrequested="WebDropDownPrincipalID_ItemsRequested"> <clientevents focus="wddOpening" /> </ig:WebDropDown>
function wddOpening(sender, e) { sender.loadItems(); }
I have investigated this at length and cannot see what is going on.
Any suggestions??
Hi Brendan,
Ok now i see the issue. Thanks for all the info. Please refer to my second post, and set EnableAutoCompleteFirstMatch="false". It will solve it.
If you want to use EnableAutoCompleteFirstMatch for this scenario, add these two lines as the last lines in the ItemsRequested server-side handler (after you databind the WebDropDown):
this.WebDropDown1.Items[0].Selected = false;
this.WebDropDown1.CurrentValue = "";
Hope this helps. Thanks,
Angel
Hi Angel
Great stuff this did work. The strange thing was that I tried this earlier when you suggested, and it didnt work. The difference was that I actually hardcoded the statement into the wdd tags myself instead of choosing the value from the properties and allowing VS to do the code insert. This should not make a difference but somehow it seems it did. Maybe I have a buggy VS2008??
Anyway thanks for your help. Very much appreciated.
PS can you suggest an online resource that actually breaks down and explains every property that is available on each IG control?? Apologies if this is already available somewhere BUT I have not found it yet.
regards
Brendan