More in this section

Forums / Developing with Sitefinity / RadTreeView SourceDragNode not set

RadTreeView SourceDragNode not set

3 posts, 0 answered
  1. Peter
    Peter avatar
    1 posts
    Registered:
    27 Jun 2011
    27 Jun 2011
    Link to this post
    We have a problem with RadTreeView Drag and Drop. 
    Some previously working code  was reorganised (by compiling a user control into a dll).As an initial test we used this compiled UserControl on a single page on an empty asp.net (non-SiteFinity) website. This works fine – so no damage was done by the compiling process. However our end goal is to use the compiled user control (comprising the RadTree Control) on a SiteFinity page.

    When we do this, drag and drop fails due to the SourceDragNode element of the RadTreeNodeDragDropEventArgs parameter being null (on the serverside RadTreeView OnNodeDrop event).  When we debug back into javascript, breaking on the clientside onClientNodeDropping event we see the source node element is correctly set. Somehow, between here and the postback arriving at the server the sourcedragNode is lost.It appears to be therefore a clientside issue with the RadTreeView clientside code. What happens between the onClientNodeDropping event and the postback that could clear the sourcedragNode? 

    Can anyone suggest what might be causing this?

    Thanks,

    Peter
  2. Daniel Powell
    Daniel Powell avatar
    1 posts
    Registered:
    02 Nov 2009
    14 Nov 2011
    Link to this post
    I'm seeing the same thing and narrowed it down to having this as the client node dropping function

     function OnClientNodeDropping(sender, args) {
                    var sourceNode = args.get_sourceNode();
                    var destNode = args.get_destNode();

                    destNode.get_nodes().add(sourceNode);
                }


    I'm not sure if this should be causing this problem though.
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    16 Nov 2011
    Link to this post
    Hello Peter,

    Can you please let us know if your control is working via postback? If yes, then please check if your Sitefinity pages have enabled ViewState (disabled by default)? If not please try enabling page's ViewState to see if the control will work properly.

    All the best,
    Radoslav Georgiev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
3 posts, 0 answered