Hi,
I have a radtreeview which is having 3 nodes say for example,
There are 3 parent nodes namely A,B,C each having 4 child nodes, I am doing client site drag and drop what ever mentioned in telerik demo.
My problem is the child nodes in parent node A should not be drag and drop to Parent node B.
Again parent node A should not be drag and drop to any other child nodes of B or C.
Here is my code what i am doing for drag and drop on client side:
| function onNodeDragging(sender, args) |
| { |
| var target = args.get_htmlElement(); |
| if(!target) return; |
| if (target.tagName == "INPUT") |
| { |
| target.style.cursor = "hand"; |
| } |
| } |
| function onNodeDropping(sender, args) |
| { |
| var dest = args.get_destNode(); |
| if (dest) |
| { |
| clientSideEdit(sender, args); |
| args.set_cancel(true); |
| return; |
| dropOnTree(args); |
| } |
| } |
| function dropOnTree(args) |
| { |
| var text = ""; |
| if(args.get_sourceNodes().length) |
| { |
| var i; |
| for(i=0; i < args.get_sourceNodes().length; i++) |
| { |
| var node = args.get_sourceNodes()[i]; |
| texttext = text + ', ' +node.get_text(); |
| } |
| } |
| } |
| function clientSideEdit(sender, args) |
| { |
| var destinationNode = args.get_destNode(); |
| if(destinationNode) |
| { |
| var firstTreeView = $find("<%=RadTreeView1.ClientID %>"); |
| firstTreeView.trackChanges(); |
| var sourceNodes = args.get_sourceNodes(); |
| for (var i = 0; i < sourceNodes.length; i++) |
| { |
| var sourceNode = sourceNodes[i]; |
| sourceNode.get_parent().get_nodes().remove(sourceNode); |
| if(args.get_dropPosition() == "over") |
| { destinationNode.get_nodes().add(sourceNode);} return GenerateNodesAsXML(); |
| if(args.get_dropPosition() == "above") insertBefore(destinationNode, sourceNode); |
| if(args.get_dropPosition() == "below") insertAfter(destinationNode, sourceNode); |
| } |
| destinationNode.set_expanded(true); |
| firstTreeView.commitChanges(); |
| } |
| } |
| function insertBefore(destinationNode, sourceNode) |
| { |
| var destinationParent = destinationNode.get_parent(); |
| var index = destinationParent.get_nodes().indexOf(destinationNode); |
| destinationParent.get_nodes().insert(index, sourceNode); |
| return GenerateNodesAsXML(); |
| } |
| function insertAfter(destinationNode, sourceNode) |
| { |
| var destinationParent = destinationNode.get_parent(); |
| var index = destinationParent.get_nodes().indexOf(destinationNode); |
| destinationParent.get_nodes().insert(index+1, sourceNode); |
| return GenerateNodesAsXML(); |
| } |
Please help me on this
Any help will be appreciated.
Thanks in advance.
Vinod
| var hidShowCloseButton = getElementId(_strCPId + 'hidShowCloseButton'); |
| var hidHideReloadBtn = getElementId(_strCPId + 'hidHideReloadBtn'); |
| var hidWindowBehaviorMove = getElementId(_strCPId + 'hidWindowBehaviorMove'); |
| var strBehaviors = ""; |
| var strTelerik = "Telerik.Web.UI.WindowBehaviors."; |
| strBehaviors = strTelerik + "None"; |
| if (hidShowCloseButton != null) { |
| strBehaviors += " + " + strTelerik + "Close"; |
| } |
| if (hidWindowBehaviorMove != null) { |
| if (hidWindowBehaviorMove.value == "true") { |
| strBehaviors += " + " + strTelerik + "Move"; |
| } |
| } |
| if (hidHideReloadBtn != null) { |
| if (hidHideReloadBtn.value == "true") { |
| strBehaviors += " + " + strTelerik + "Reload"; |
| } |
| } |
| radWnd.set_behaviors(strBehaviors); |

I am attempting to disable embedded scripts for the radEditor on a project that uses radEditor with RadSpell, Dialogs and a couple Tooltips. I am disabling all EmbeddedScripts in the web.config with:
<add key="Telerik.EnableEmbeddedScripts" value="false"/>
From my research on your forums I found I also need to use the source version of the EditorDialogs and configure them to load their scripts from source as well. Unfortunately my version does not include the source for the EditorDialogs.
The reason I would like to disable embedded scripts is because I am running into an error with the xhtml filter and I cannot find a way to permanently disable it across the entire page lifecycle. I can disable it using the OnClientLoad event of the editor like so:
editor.get_filtersManager().set_enableXhtmlFilter(
false);
This works fine when the control is initially loaded, however it does not persist on an AJAX postback.
