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.
[JScript]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.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.
Facebook
Twitter
Google+