Hi,
When I unselect an item from webdropdown using
$find(webdropdown).get_selectedItem().unselect();
I see that the unselected item shows in the dropdown in a different color than the current selected item. This gives a kind of impression whether the unselected item was actually unselected or not. Is there any way to remove this color and ensure that only one item gets selected at a time.
FYI, I have EnableMultipleSelection property of webdropdown = "False".
Hello SunilMehta,
Thank you for posting to Infragistics forums.
I suggest you to use the following approach to unselect the items in the WebDropDown.
function clearSelection() { var dropDown = $find("WebDropDown1"); var item = dropDown.get_items().getItem(dropDown.get_selectedItemIndex()); if (item != null) { item.unselect(); item.inactivate(); // optionally, clear input text // dropDown.set_currentValue("",true); } return false; }
var dropDown = $find("WebDropDown1");
var item = dropDown.get_items().getItem(dropDown.get_selectedItemIndex());
if (item != null) {
item.unselect();
item.inactivate();
// optionally, clear input text
// dropDown.set_currentValue("",true);
}
return false;
For more information, please refer to the following forum threads.
http://ko.infragistics.com/community/forums/p/68368/346297.aspx
http://ko.infragistics.com/community/forums/p/30177/161244.aspx
Please let me know if you have any further questions regarding this matter.
www.infragistics.com/support
At any point, only one item should be selected in the webdropdown if I am not using the webdropdown in Multi-selection mode. Is there any property that needs to be changed so that only one item should show selection at a time.
In my case, I have 3 items in webdropdown. First I selected 1st item and then selected, 3rd item. When I selected 3rd item, the 1st item lost selection which is expected. But when I do a postback to server by clicking on any button on the page, I can see that both 1st and 3rd item shows selection in the webdropdown list. This is unexpected.
I tried your options but did not work.
Hello Sunil.
Please let me know if you need any further assistance regarding this matter.
Hello Suniil,
Can you please provide me the markup for the WebDropDown?