Need to configure attached multiple selection WDD as following:
Thanks.
igWDD.zip
Hello Michael,
After investigating this further, I determined that the WebDropDown could stay opened after selecting an item by setting the property “EnableClosingDropDownOnSelect” to false. Regarding your second requirement what I could suggest is binding a method to the blur event, getting the current value and if the value is not correct, the focus would be set back to the input of the dropdown:
function blur(sender, evt) {
var wdd = $find('<%=wddUno.ClientID%>');
if (wdd.get_currentValue().includes("2014")) {
wdd._elements["Input"].focus();
}
Below I am attaching a sample, demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.
Regards,
Monika Kirkova,
Infragistics
WebDropDownValidate.zip
Hi Monica,
EnableClosingDropDownOnSelect = false has resolved stay open issue,, but the second issue
- validation on losing focus did not work, I were not able to see that blur function hit...
- what is the nature of the Client-blur property...
- do I need to load jQuery library
- Do I need modernizr - this link seems like not working
- can you send designer file too , so I will try to run without converting..
The clientEvent “blur” is fired every time the WebDropDown loses focus, I have bound a method to the event, in order to execute the code in the method, every time the event is triggered.
<ig:WebDropDown ID="wddUno" runat="server" Width="200px" ClientEvents-Blur="blur" . . . >
<script>
</script>
The jQuery scripts are necessary, in order to use the “find” method, as for the modernizr, it is not needed in this project. Additionally, another approach could be to cancel the “dropDownClosing” event by setting “event._cancel” to true if the value is not correct.
<ig:WebDropDown ID="wddUno" runat="server" Width="200px" ClientEvents-DropDownClosing="closing" . . . >
function closing(sender, evt) {
evt._cancel = true;
Below I am attaching both suggestions, including the designer file. Please let me know if you need any further information regarding this matter.
WebDropDownValidateValue.zip
Hi Monika,
I added what you have sent to me into my pj and it worked... Thanks a lot.. I do have a question although.
What is the nature of this kind of properties like that ClientEvents-Blur = "..." I did not work with web form for a while .. from older projects I do remember syntax like that in the markup files :
<ClientEvents SelectionChanged="SetBtnSaveANDChangesState"/>
Is that new syntax to get client events, can you refer to the place in ig documentation for it. Also will it work in older ig components?
ClientEvents could be added to the controls in two ways: as a properties for the control:
<ig:WebDropDown ID="wddUno" runat="server" Width="200px" ClientEvents-Blur="blur">
or in the body of the controls as below:
<ig:WebDropDown ID="wddUno" runat="server" Width="200px">
<ClientEvents Blur="blur" />
</ig:WebDropDown>
Both ways should work for all controls. The WebDropDown exposes the public property ClientEvents. More information regarding all ClientEvents could be found in the following topic.
Please let me know if you need any further information regarding this matter.
All clear.... Thanks for your help
I am glad that you find my suggestion helpful and were able to solve your issue.
Thank you for using Infragistics components.