SourceNode and DestinationNode always null

4 posts, 0 answers
  1. Sean
    Sean avatar
    2 posts
    Member since:
    May 2013

    Posted 06 May 2013 Link to this post

    Hello,

    I'm evaluating the RadOrgChart control. I set up a simple demo to begin working with the server side object model, but it appears that arguments passed to the NodeDrop handler are always null. Can you help me identify what's not working? Thanks.

    <telerik:RadOrgChart ID="RadOrgChart2" runat="server" Skin="Sitefinity" Font-Bold="True" EnableDragAndDrop="True" OnNodeDrop="RadOrgChart2_NodeDrop" DataFieldID="OBJECT_ID" DataFieldParentID="PARENT_ID" DataTextField="Name">
            <RenderedFields>
                <NodeFields>
                    <telerik:OrgChartRenderedField DataField="DESC4" Label="TEAM"/>
                </NodeFields>
                <ItemFields>
                    <telerik:OrgChartRenderedField DataField="DESC3"/>
                </ItemFields>
            </RenderedFields>
    </telerik:RadOrgChart>
    protected void bindChart()
            {
                var pathCode = (ConfigurationManager.AppSettings["PathCode"] == "PROD" ? Common.PathCode.PROD : Common.PathCode.TEST02);
                var visDA = new Visibility(pathCode);
                 
     
                RadOrgChart2.DataSource = visDA.VisibilityData.GetDataTable("SELECT OBJECT_ID, PARENT_ID, DESC1 + ', ' + DESC2 AS Name, DESC3, DESC4 FROM dbo.HIERARCHY WHERE CLASS_NAME='ORG'", "", 0);
                RadOrgChart2.DataTextField = "Name";
                RadOrgChart2.DataFieldID = "OBJECT_ID";
                RadOrgChart2.DataFieldParentID = "PARENT_ID";
                RadOrgChart2.DataBind();
     
            }
     
            protected void RadOrgChart2_NodeDrop(object sender, Telerik.Web.UI.OrgChartNodeDropEventArguments e)
            {
                var sourceNode = e.SourceNode.ID;
                var destinationNode = e.DestinationNode.ID;
                bindChart();
            }
  2. Sean
    Sean avatar
    2 posts
    Member since:
    May 2013

    Posted 07 May 2013 Link to this post

    Please disregard - I've discovered the problem, and it was my mistake. Thank you!
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philippe GRACA
    Philippe GRACA avatar
    29 posts
    Member since:
    Nov 2003

    Posted 27 May 2013 Link to this post

    Hi Sean
    I'm facing the exact same issue.
    Could you please explain what you did to resolve it?
    Regards
    Philippe
  5. Philippe GRACA
    Philippe GRACA avatar
    29 posts
    Member since:
    Nov 2003

    Posted 27 May 2013 Link to this post

    Ok Got it
    I have to do the Data binding in the page load very time...
Back to Top