I am having a wierd issue.
I am currently using web dropdown having multi select check box enabled.
After binding data source to the web dropdown, by default always the first value in the web drop down is checked.
I don't want the first value in the multiselect web dropdown checked by default.
Can you please provide me work around on the above issue.
Trails i made:
------------------
I tried by calling ClearSelection() of the web dropdown in some event.
I also tried by calling the unselect() event of the item(first value in the dropdown) through client side, but once some post back happens on the page again, the first value in the dropdown got checked by default.
But, the above trails could not provide me solution.
Provide me the solution,
Hi Alex,How do i set Default value "SELECT on dropdown ,when my DisplayMode="DropDownList" ,NullText="Select".I tried from code behind ddlMultiTest.Items.Insert(0, new DropDownItem("Select", "NA")); but dropdown display select with checkbox.Please Help me
Angel,
The idea of the Microsoft asp:DropDownList that is mentioned makes sense. However, that dropdown is not capable of multi-selection like the Infragistics WebDropDown is. Once you turn on Multiselect on the ig:WebDropDown, it doesn't make sense to have DisplayMode set to DropDown. Since each item can be rendered with a checkbox, we know that ALL items will be valid selections. All you need to be able to do is check the checkbox, so there should be no typing in the WebDropDown at all. For Multi-select with checkboxes, the only logical DisplayMode is DropDownList so there should be no reason to automatically select the first item in the list in this case.
wvusaf
Thank You !
Hi, The idea of DisplayMode = DropDownList is exactly that you will always have a valid selection, so whatever is in the input box (CurrentValue) matches with your items. That's how the Microsoft asp:DropDownList works by default.
If you really want to have DisplayMode = DropDownList, and not have initial selection , then you will have to resort back to DisplayMode = DropDown, and cancel the ValueChanging client-side event, in case the entry doesn't match an item.
Hope it helps. Thanks,
Angel
Hello,
Your solution only works when
DisplayMode = DropDown
However, if you set DisplayMode = DropDownList then CurrentValue="" DOES NOT work !
How can I make it work with DisplayMode = DropDownList ?
Please Respond