Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
10 views

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

Rumen
Telerik team
 answered on 19 Aug 2025
0 answers
87 views
In RadOrgChart , Why is this happening ?
Pro
Top achievements
Rank 1
 asked on 14 Jul 2023
0 answers
165 views

I have a large dataset of employees.

I want to load one node initially and all other node collapsed and load other node on demand.

But this control is loading complete data on page load which is making it slow.

is there any way to rebind the org chart on expand and bind all child nodes?

 

anuj
Top achievements
Rank 1
 asked on 01 Jun 2023
1 answer
138 views

I would like to add a hyper link to the node of an Org Chart, and I tried to add like:


<telerik:RadOrgChart>
<ItemTemplate>
<div class="abc">
<a herf="abc.abc">test link</a>
But it won't work. The hyperlink is not even clickable. Can anyone tell me how to add hyperlink to OrgChart?
yuki
Top achievements
Rank 2
Iron
Iron
Iron
 updated answer on 08 May 2023
1 answer
257 views

My page logic is that I click on an 'Apply' button, then in the Apply_Click method, I do some data binding, such as: Grid1.Datasource = xxx; Grid1.DataBind(); . And the grid can show properly on the page. But when I click on other buttons on this page (for example: click the filter on the grid) to trigger a post back, the content on the grid just disappears (The datasource is stored in a session, so it's not datasource's problem). I need to add databind() to Page_Load() to prevent this from happening. But this is very weird and feels not right. Can you help me locate the real problem?

The same issue is happening bothe in Grid and OrgChart.

Doncho
Telerik team
 answered on 25 Apr 2023
1 answer
292 views

I read this , but when I copied the code into my own project and followed the documentation, this just didn't work. The node size and the group size are weird.  No matter how I tried to edit the css settings, the height of the node just wouldn't change. Can anybody help me?

And btw I also want to ask, what do  .rocItem and .rocItemContent mean? When I use my browser's inspect function, I also see a .rocItemTemplate, what is that?

Doncho
Telerik team
 answered on 25 Apr 2023
0 answers
110 views

So I have a organization chart and a button. When I click on the button, I will fill in a DataTable stored in ViewState to be the data source of the org chart. Since I'm still having the problem in another post that nobody replied yet: Databinding keeps disappearing when post back in UI for ASP.NET AJAX | Telerik Forums  So I add some handling in Page_Load to avoid the org chart from becoming blank.

My Page logic is as follows:


<Telerik:RadButton ID="btn1" OnClick="btn_click">
...
<Telerik:RadOrgChart ID="OrgChart1">



protected DataTable table1 { get { if (ViewState["table1"] != null) return (DataTable)ViewState["table1"]; else

return null; } set { ViewState["table1"] = value; } } protected DataTable table2 { get { if (ViewState["table2"] != null) return (DataTable)ViewState["table2"]; else return null; } set { ViewState["table2"] = value; } } protected void Page_Load(object sender, EventArgs e) { if (!PostBack) // do something

if (table1 != null && table2!=null) { OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "aaa"; OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "bbb"; OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataCollapsedField = "ccc"; OrgChart1.RenderedFields.NodeFields.Add(new OrgChartRenderedField() { DataField = "A" }); OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = table1; OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "aaa"; OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ddd"; OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = table2; OrgChart1.DataBind(); } }



protected void btn_click(object sender, EventArgs e) {

               // do something to provide data for table1 and table2

                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "aaa";
                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "bbb";
                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataCollapsedField = "ccc";
                OrgChart1.RenderedFields.NodeFields.Add(new OrgChartRenderedField() { DataField = "A" });
                OrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = table1;

                OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "aaa";
                OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ddd";
                OrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = table2;

                OrgChart1.DataBind();

}

    

And then, when the page is post back, suddenly there are duplicate group names in the org chart as you can see in the screenshot.

Can somebody help me?

yuki
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 21 Apr 2023
0 answers
112 views
Is it possible to add a radbutton to org chart nodes? I would like to add a button to org chart nodes, and when the button is clicked, something happens to the webpage. I looked through demos and didn't find anything related? Could someone tell me if this is feasible? Thanks.
yuki
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 21 Apr 2023
0 answers
97 views

Is there any way to sort nodes based on hierarchyid?

currently default sorting based on alphabetical order.

 

Thanks in advance

Hari
Top achievements
Rank 1
 asked on 28 Jan 2022
16 answers
407 views
I am using the OrgChart control to display 1100 employees.  Due to the size and structure of the company I have limited it to displaying 2 levels of employees and enabled drill down.

What I'm trying to implement now is the ability for someone to search for a particular employee and then jump to that location in the OrgChart.  Is that even possible?  If so, it certainly isn't straightforward.

Thanks,
Kyle
SMc
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 17 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Nakul
Top achievements
Rank 1
Rina
Top achievements
Rank 1
Mukesh
Top achievements
Rank 1
Ruksana
Top achievements
Rank 1
Rakesh
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Nakul
Top achievements
Rank 1
Rina
Top achievements
Rank 1
Mukesh
Top achievements
Rank 1
Ruksana
Top achievements
Rank 1
Rakesh
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?