Telerik.Web.UI.OrgChartDrillDownEventArguments.SourceNode.get returns Nothing

0 Answers 2 Views
General Discussions OrgChart
Gerhard Krenn
Top achievements
Rank 1
Gerhard Krenn asked on 18 Aug 2025, 01:51 PM | edited on 18 Aug 2025, 01:53 PM

I try to follow the example in https://demos.telerik.com/aspnet-ajax/orgchart/examples/applicationscenarios/drilldowntoviewdetails/defaultvb.aspx?show-source=true but if I run the code and click on an icon for drill-down I get the error at the line "If e.SourceNode.ID <> "1" Then":

Telerik.Web.UI.OrgChartDrillDownEventArguments.SourceNode.get returned Nothing.

The code is:

  Private Sub RadOrgChart2_DrillDown(sender As Object, e As Telerik.Web.UI.OrgChartDrillDownEventArguments) Handles RadOrgChart2.DrillDown
      If e.SourceNode.ID <> "1" Then
          Dim item = New OrgChartGroupItem()
          e.SourceNode.Renderer.Controls.Remove(e.SourceNode.Nodes.Renderer)
          e.SourceNode.GroupItems.Clear()
          e.SourceNode.Nodes.Clear()
          e.SourceNode.GroupItems.Add(item)
      End If
  End Sub

Please advise!

Thx
Gerhard

No answers yet. Maybe you can help?

Tags
General Discussions OrgChart
Asked by
Gerhard Krenn
Top achievements
Rank 1
Share this question
or