In this example, all OrgChartGroupItems are templated with the same template, which is set directly to the OrgChart.
OrgChartGroupItems can be templated using 3 different properties:
- OrgChartGroupItem.Template - if this property is set, the item disregards any other templates that otherwise would apply to it;
- OrgChartNode.ItemTemplate - applies to all the GroupItems in the OrgChartNode, which does not have Template property set;
- RadOrgChart.ItemTemplate - applies to all GroupItems, that do not have Template set and whose parent OrgChartNode's ItemTemplate is not set either.
This, ultimately, makes the templating very flexible. Also, RadOrgChart template supports binding expressions - one can access custom properties in the DataItem as follows:
<%# DataBinder.Eval(Container.DataItem, "CustomPropertyName") %>