Using the StartNode Property to Filter Nodes
SmartChart allows developers to filter nodes using the XPath or StartNode properties. This example demonstrates how the StartNode property can be set programmatically to filter down to a specific employee. This example looks for any Employee nodes with a child id node equal to 304. The XML data used in this example is flat (no hierarchy) so a hierarchy is generated by using the DataSet object combined with the XmlDocument object.

Org Chart
M. Sandra Grischy
Manager Continous Care & Triage








































Pam Abbott
Licensed Practical Nurse
James Ed Baggett
Licensed Practical Nurse
Karen Byers
Licensed Practical Nurse
Sherry Cheatham-liles
CNA - PRN
Patricia Crafton
LPN - PRN
Elizabeth Doskey
RN - PRN
Melissa Dunn
LPN - PRN
Catherine Ehlen
Licensed Practical Nurse
Patricia Gorton
LPN - PRN
Sue Gray
RN - PRN
Ann Hatcher
RN - PRN
Amelia Isom
CNA - PRN
Christine Kellejian
Licensed Practical Nurse
Jacqueline Kelly
CNA - PRN
Sandra Klein
RN - PRN
Billie Luttrell
Licensed Practical Nurse
Rebecca Maguire
RN - PRN
Jane Mbuya
CNA
Julie Mosley
CNA - PRN
Martha Owens
LPN - PRN
Nicol Perez
LPN - PRN
Meagan Riegle
Clinical Support Specialist
Sheila Shepherd
LPN - PRN
Crystal Stallings
Licensed Practical Nurse
Pam Summers
LPN - PRN
Evelyn Swatts
LPN - PRN
Jan Walters
RN - PRN
Oneika Williams
Clinical Support Specialist
Amy Woodward
Licensed Practical Nurse
Nancy Wynn
CNA - PRN
 
ASPX Code

<%@ Page language="c#" MasterPageFile="~/SampleCode/SamplesMasterPage.master" Inherits="SmartWebControls.SampleCode.UsingStartNode" CodeFile="UsingStartNode.aspx.cs" %>
<%@ Register TagPrefix="swc" Namespace="SmartWebControls" Assembly="SmartWebControls.SmartChart" %>
<asp:Content ID="content" runat="server" ContentPlaceHolderID="cphMain">
    <div id="divTitle">Using the StartNode Property to Filter Nodes</div>
    <div id="divInstructions">
        SmartChart allows developers to filter nodes using the XPath or StartNode properties.  This example demonstrates
        how the StartNode property can be set programmatically to filter down to a specific employee.  This example
        looks for any Employee nodes with a child id node equal to 304.  The XML data used in this example is flat (no hierarchy) 
        so a hierarchy is generated by using the DataSet object combined with the XmlDocument object.
    </div>
    <p></p>
    <asp:Label ID="lblOutput" runat="server" />
    <swc:SmartChartPro id="SmartChart1" title="Org Chart" runat="server" OutputType="Html" AllowDrillDown="True"
        DataTitleFields="name,title" font-size="8" MaxTextLength="30" 
        Width="850px" Height="400px" DataNodeName="Employee" DataKeyField="id" DataFields="name,title"
        BoxColor="Gainsboro" BoxGradient="True" ChartDepth="2" 
        font-bold="false" MaxChildrenPerLevelGroup="6"
        HasParentImagePath="~/SampleCode/SmartChartPro/Images/up.gif" HasParentImageVSpace="6"
        HasChildrenImagePath="~/SampleCode/SmartChartPro/Images/down.gif" HasChildrenImageVSpace="0"
        DrillDownType="SmartChartImage"></swc:SmartChartPro>
        <div style="height:400px;">&nbsp;</div>
</asp:Content>

C# Code: