Hi,
I'm having an asp dropdownlist with selectedindexchanged event.. I'm having around 4-5 infragistics webddropdown multi select boxes, Whenever user selects options in multidropdown list and again selects the above normal asp dropdownlist, the items selected in the multidropdown should be cleared and initial value should be set to "Please Select"..
How can i implement this in asp dropdownlist selectedindexchanged event??
Can anyone please help me out as its bit urgent..
Thanks,
This worked fine, But i dont want to give any clickable functionality on the dropdown, When i used the above script, and pressed HOME and END keys in the keyboard, Eventhough there are values selected in the dropdown were set to Please Select.
I'm using this function in InputKeyDown function..
<script language="javascript" type="text/javascript"> function ddlCBT_InputKeyDown(sender, eventArgs) { var dropdown = $find('<%=ddlCBT.ClientID %>'); //unselect and inactivate the selected items// while (dropdown.get_selectedItems().length > 0) {// dropdown.get_selectedItems()[0].inactivate();// dropdown.get_selectedItems()[0].unselect();// } //set some default value in the dropdown's input field dropdown._elements["Input"].value = "-Please Select-"; } </script>
Hi pavanpilugandla,
Thank you for your reply.
The above code may be used in the SelectionChanged function previously used as the handler for the clienside onchange event of the ASP dropdownlist.
Please let me know if this helps.
Petar Ivanov"] //unselect and inactivate the selected items while (dropdown.get_selectedItems().length > 0) { dropdown.get_selectedItems()[0].inactivate(); dropdown.get_selectedItems()[0].unselect(); } //set some default value in the dropdown's input field ig_controls.WebDropDown1._elements["Input"].value = "Default value";
//unselect and inactivate the selected items while (dropdown.get_selectedItems().length > 0) { dropdown.get_selectedItems()[0].inactivate(); dropdown.get_selectedItems()[0].unselect(); } //set some default value in the dropdown's input field ig_controls.WebDropDown1._elements["Input"].value = "Default value";
//unselect and inactivate the selected items while (dropdown.get_selectedItems().length > 0) { dropdown.get_selectedItems()[0].inactivate(); dropdown.get_selectedItems()[0].unselect(); }
//set some default value in the dropdown's input field ig_controls.WebDropDown1._elements["Input"].value = "Default value";
Where should i include this script? In InputKeyDown event or what? Please let me know..
Thanks
Hi pavanpuligandla,
Apologies, please ignore my last suggestion. A possible way to tackle this may be to keep the display mode of the control to "DropDownList" and set the value of the dropdown's input element as needed.
For instance:
Please let me know if you have any questions.
Can you be able to reproduce this issue? Any help is appreciated..