How to change the node size of org chart?

1 Answer 167 Views
OrgChart
yuki
Top achievements
Rank 2
Iron
Iron
Iron
yuki asked on 20 Apr 2023, 08:23 AM | edited on 20 Apr 2023, 09:07 AM

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?

1 Answer, 1 is accepted

Sort by
0
Accepted
Doncho
Telerik team
answered on 25 Apr 2023, 06:27 AM

Hi Yuki,

I am attaching a sample project where the code snippets from the article are used in two separate aspx pages. On my end, the result is the same as the one demonstrated in the screenshots in the article.

One difference I noticed is that the OrgChart in the code snippets has its RenderMode to Lightweight but the images in the same article are illustrating the Control in Classic render mode. I will update the content so that the images are precisely corresponding to the snippets below.

To be able to run the sample project, you will need to add Telerik.Web.UI.dll to the bin folder.

As to .rocItem, .rocItemContent, and .rocItemTemplate: these are class names assigned to elements rendered in the Html representation of the RadOrgChart control (.roc stands for RadOrgChart). The same class names are used internally by the JavaScript logic handling the default behavior of the control. You can also leverage those class names to customize the appearance with some custom CSS on the page.

Note that the exact rendering and the class names used might differ depending on the RenderMode set to the Control.

Kind regards,
Doncho
Progress Telerik

Heads up! Telerik UI for ASP.NET AJAX versions for .NET 3.5 and 4.0 are retired. Progress will continue shipping assemblies compatible with .NET 4.5 and later. See whether this affects your apps in this article.
yuki
Top achievements
Rank 2
Iron
Iron
Iron
commented on 02 May 2023, 02:10 AM

Hello, Doncho, Thanks for your answer. I'll try.
Tags
OrgChart
Asked by
yuki
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Doncho
Telerik team
Share this question
or