New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Drag and Drop to HTML Elements That Have No ID

If you need to drop a TreeNode onto an HTML element that has no ID, then a postback will not occur upon dropping. Hence, the NodeDrop event will not be executed, either.

To solve the problem you need to hook on the OnClientNodeDropping event and set an ID to the target HTML element, like:

function onNodeDropping(sender, args){ 
    args.get_htmlElement().id="IdValue"; 
}

You can get the ID of the HTML element in the NodeDrop event handler by using the event arguments:

protected void RadTreeView1_NodeDrop(object sender, Telerik.Web.UI.RadTreeNodeDragDropEventArgs e)
{    
    String id = e.HtmlElementID;
}
Protected Sub RadTreeView1_NodeDrop(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeDragDropEventArgs)
    Dim id As String = e.HtmlElementID
End Sub
In this article