Have you been looking for a way to visually represent your organization? You’re not alone - many of our customers have been requesting this exact feature. Enter the RadOrgChart. This new ASP.NET AJAX control is perfect for displaying hierarchical structures in a visually appealing and intuitive way. My colleague Nikolay already wrote a blog post regarding the features of this control and the post has a lot of good links that you can follow. What I wanted to take a look at here is how you can get started working with this new and awesome control today, so let’s get started :)
Some of you might be wondering what this newfangled control even is so for the sake of making sure we’re all on the same page I encourage you to look over the First Look Demo that we have in our online demos. This page will give you a quick look at just what the control can accomplish.
So now that we know what the control looks like, let’s dive into the structure a bit so we can see what’s really going on. What you might have noticed is that the overall layout is driven by the following structure:
We have the control itself, RadOrgChart, which will contain a collection of OrgChartNode objects which are all contained in the Nodes tag. Each individual node could either have a collection of nodes itself (don’t we all just love hierarchies?) or a collection of OrgChartGroupItems via the GroupItems tag. A GroupItem is what gets rendered as one of our items in the control. Knowing that, let’s dissect the code of the First Look Demo to see how this all comes together. We start off by declaring our RadOrgChart and creating our Nodes tag:
Additionally if we wanted to be extra fancy we could define the ImageUrl property of each of our OrgChartGroupItems, placing an image of each of the employees next to their name. Keep in mind that this image is limited to a 48x48 pixel size, so don’t go sticking a 1920x1080 wallpaper in there ;) You could also easily override the default icon (which is used in this example) by utilizing the DefaultImageUrl property in the RadOrgChart tag. Same 48x48 restriction goes for this image as well.
If you haven’t already explored the rest of our demos I highly encourage that you do so. If you don’t feel like exploring too much, the other blog post I mentioned in the beginning of this post is very helpful in splitting up all of the links into groups and does some of the work for you :) Keep in mind that we just went over how to declaratively define the RadOrgChart in this post but there are plenty of data binding options as well!
Have you already started using the RadOrgChart in your application? Feel free to share your experiences in the comments below!