Editors suite controls stop functioning when using jquery ui dialog.
tested with aspxComboBox and aspxDateEdit, possibly others as well.
Steps to Reproduce:
Open the sample project and run default.aspx.
Press the 'open dialog' button and the dialog appears.
As you can see the normal dropdown will work when clicking, but the aspxcombobox next to status will not function and neither will the date item.
This is a stripped project to minimize code, so the problem can be quickly found. Please do not pay attention to style as css elements are not all included.
Please let me know if you require any additional information.
I hope this issue can be resolved quickly.
Thank you for your response and efforts.
Kind regards,
P.J. Bollebakker
We have closed this ticket because another page addresses its subject:
Provide the capability to use jQuery UI widgets with our controls
Hello P.J.
I've reproduced the issue and forwarded it to our developers for a detailed examination. Sorry for a possible delay.
Thanks,
Vest
Thank you for the update.
Hi P. J.
A similar problem has been already discussed in our Support Center. Please review issue report ASPxGridView - Problem with the jQuery Sortable plugin.
This issue is caused by the fact that JQuery evaluates all scripts within the container, including our controls' initialization scripts multiple times. As a possible solution, rewrite a part of the JQuery source code to skip our controls' script blocks. Their IDs are starting with "dx".
Thanks,
Michael.
Hi P. J.,
In your instance, you can call the following PatchJQuery function after the page is loaded, or after the main JQuery script is loaded, or directly call this function at the end of the main JQuery script.
function PatchJQuery() { if(!window.jQuery || !window.jQuery.clean) return; var original = window.jQuery.clean; window.jQuery.clean = function(elems, context, fragment, scripts) { var execResult = original.call(jQuery, elems, context, fragment, scripts); if(scripts && scripts.length) { for(var i = scripts.length - 1; i >= 0; i--) { var script = scripts[i]; if(IsDXScript(script)) ArrayRemoveAt(scripts, i); } } return execResult; }; } // Utils function IsDXScript(script) { return script && script.id && script.id.indexOf("dx") == 0; } function ArrayRemoveAt(array, index) { if(index >= 0 && index < array.length){ for(var i = index; i < array.length - 1; i++) array[i] = array[i + 1]; array.pop(); } }
Attached is a modified project.
Thanks,
Michael.
WOW, now that's what I call support! It would have taken me days if not more to figure that out.
I can't tell you enough how much I appreciate the effort you have taken to write up this solution. Thank you very very much!!
Hi P. J.,
I am happy to hear that our assistance was helpful to you. Our customers' warm words are the best reward for all of us. Please feel free to contact us in case of any difficulties.
Thanks