Flexible and versatile organisational charts for ASP.NET using
Org Chart Component.


ASP.NET Org Chart Component - Rendering Assistants

The organisation chart component supports the rendering of assistants. Assistants can be used to represent a variety of roles within an organisation, for example personal assistants.

The example below is shows an XML bound organisation chart bound to this XML Chart.  To indicate that a chart Item should be rendered as an assistant the RenderAsAssistant attribute must be added to the data element and set to "True".   This can either be as an attribute in an Xml file as shown or as a column in a DataTable for a DataBound xml chart.

The positioning of the assistants can be on either the left or the right and this behaviour is controlled by the Org Chart Control by setting the property "AssistantItem.DrawRight"

Tom
Tim
Phil
Sarah
Dan
Paul
Peter
John
Jamie
Jen
Freddy
Jack


Code:

Xml Data File

1: <?xml version="1.0" encoding="utf-8" ?>
2:     <Node name="Tom">
3:     <Node name="Tim" renderAsAssistant="true"/>
4:     <Node name="Phil" renderAsAssistant="true"/>      
5:     <Node name="Sarah"  >
6:       <Node name="Paul"/>
7:       <Node name="Peter"/>
8:       <Node LineStyle="dashed" name="Dan" renderAsAssistant="true"/>
9:     </Node>
10:     <Node name="John"  >
11:       <Node name="Jen">
12:         <Node LineStyle="dotted" name="Freddy" renderAsAssistant="true"/>
13:       </Node>             
14:       <Node name="Jack"/>
15:       <Node LineStyle="dotted" name="Jamie" renderAsAssistant="true"/>     
16:     </Node>
17:     </Node>

Html Markup

1:  <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/demo7.xml"></asp:XmlDataSource>
2:     <cc1:XmlBoundOrganisationChart ID="XmlBoundOrganisationChart1" runat="server" DataSourceID="XmlDataSource1">
3:         <AssistantItem ShowBackgroundImage="False" AssistantHeight="55">
4:             <ItemStyle Font-Bold="False" Font-Overline="False" Font-Strikeout="False" />
5:         </AssistantItem>
6:         <DetailedTemplate>
7:             <div class="demo7DetailedTemplate">
8:                 <%#Container.DataElement("name") %>
9:             </div>
10:         </DetailedTemplate>
11:         <AssistantTemplate>
12:             <div class="demo7AssistantTemplate">
13:                 <center>
14:                     <%#Container.DataElement("name") %></center>
15:             </div>
16:         </AssistantTemplate>
17:         <ChartItem ShowBackgroundImage="False">
18:         </ChartItem>
19:     </cc1:XmlBoundOrganisationChart>