"Load on demand" example for real scenario

3 posts, 0 answers
  1. Carlos Rodriguez
    Carlos Rodriguez avatar
    72 posts
    Member since:
    Aug 2009

    Posted 08 Jun 2016 Link to this post

    Hello Telerik team!
    I use the example for load on demand my orgchart, but, not sure how work, because in the example, data is load one time, but i need get data from database and create new nodes from the node selected.

    I tried to create nodes but did not succeed.
    Annex example.


    Thank you vey much.


  2. Carlos Rodriguez
    Carlos Rodriguez avatar
    72 posts
    Member since:
    Aug 2009

    Posted 10 Jun 2016 Link to this post


    I'll restate my question:

    I have this code to create new nodes when i click on drilldown button, but, not show the new nodes.

    What do I lack? what am I doing wrong?

    Protected Sub RadOrgChart1_DrillDown(ByVal sender As Object, ByVal e As Telerik.Web.UI.OrgChartDrillDownEventArguments) Handles RadOrgChart1.DrillDown

            Dim node = TryCast(e.SourceNode, OrgChartNode)
            If e.SourceNode.Nodes.Count > 0 Then
                e.SourceNode.Nodes.RemoveRange(0, e.SourceNode.Nodes.Count - 1)
            End If
            'get employee from database
            Dim ct As DataTable = clsOrgChart_2.orgChart_getUsers(e.SourceNode.ID).Tables(0)
            'add employees into node.
            For Each itemRow As DataRow In ct.Rows
                Dim nNode As New Telerik.Web.UI.OrgChartNode
                nNode.DataItem = itemRow
        End Sub



    Thank you! :)

  3. Veselin Tsvetanov
    Veselin Tsvetanov avatar
    1231 posts

    Posted 13 Jun 2016 Link to this post

    Hi Carlos,

    May I ask you to give as a bit more details of your implementation. What is you RadOrgChart markup declaration and how do you initially load the root nodes?

    Veselin Tsvetanov
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top