Org chart with a large dataset

3 posts, 0 answers
  1. Sree
    Sree avatar
    2 posts
    Member since:
    Jun 2011

    Posted 02 Jun 2012 Link to this post

    I trying to bind the orgChart to a large dataset and doesn't seem to work. The dataset contains about 150000 rows. I am using the latest Q2 Beta.
    <telerik:RadOrgChart ID="RadOrgChart1" runat="server" EnableCollapsing="true" LoadOnDemand="NodesAndGroups" Skin="Office2010Blue">



     protected void Page_Load(object sender, EventArgs e)

        private static void BindToDataSet(RadOrgChart orgChart)
            string dbConnectionString = ConfigurationManager.ConnectionStrings["mambophilprod"].ConnectionString;
            MySqlDataAdapter adapter = new MySqlDataAdapter("SELECT Id, ParentId, CurrentPosition From mambophil_flat_tree",

            DataSet links = new DataSet();

            orgChart.DataTextField = "CurrentPosition";
            orgChart.DataFieldID = "Id";
            orgChart.DataFieldParentID = "ParentID";

            orgChart.DataSource = links;

    This is what I would like to do.
    - I want to show the first few levels (say 10)
    - When the user clicks on one of the last levels, the system fetches the next 10 levels.

    Is this possible? Appreciate your help.

  2. Sree
    Sree avatar
    2 posts
    Member since:
    Jun 2011

    Posted 03 Jun 2012 Link to this post

    By looking at some of the examples, I was able to work around the problem by setting the MaxDataBindDepth property. I am running into another problem with the ordering of the child nodes. I am trying to display a BinaryTree and I want to display the leftNode followed by RightNode. The left and Right positions are in the database record for every node and they share the same parentID.

    For example, this is my database structure:-

    Id        ParentID    Position    Text
    1          null             Top         Root
    2         1                  Left        L1
    3         1                  Right      R1

    My rendered tree looks like this:
                    L1              R1

    In this case, both L1 and R1 share the same parentID and I want to preserve the order for the children (Left followed by Right).
  3. DevCraft R3 2016 release webinar banner
  4. Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 06 Jun 2012 Link to this post

    Hello Sree,

    I am glad to hear that you solved your first issue.
    Regarding the your second question the child nodes are rendered in the order of their position in the data table. RadOrgChart does not support reordering of the nodes position.

    All the best,
    Peter Filipov
    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.
Back to Top