Why it shows itemTemplate and ItemField as well.

2 posts, 0 answers
  1. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 18 Nov 2011 Link to this post

    Hello,

    Please check attached image for issue.

    <telerik:RadOrgChart ID="RadOrgChart1" runat="server">
               <ItemTemplate>
                   <asp:Image ID="Image1" runat="server" ImageUrl="http://2.bp.blogspot.com/_LBAtNnpRN7k/S_DfBlu9Q7I/AAAAAAAAPTE/znoECHLIizM/s200/User+Accounts+in+Windows.jpg"
                       Width="30px" Height="30px" />
                    
                   Name:
                   <asp:Label ID="Label1" runat="server" Text='<%# Eval("Certificates") %>'></asp:Label>
                   
                   <asp:Label ID="Label2" runat="server" Text='<%# Eval("Text") %>'></asp:Label>
                 <br />
               </ItemTemplate>
               <RenderedFields>
                   <NodeFields>
                       <telerik:OrgChartRenderedField DataField="TeamName" Label="Team" />
                   </NodeFields>
                     <ItemFields>
                       <telerik:OrgChartRenderedField DataField="Certificates" Label="Certificates" />
                       <telerik:OrgChartRenderedField DataField="Text" Label="Text" />
                   </ItemFields>
               </RenderedFields>
           </telerik:RadOrgChart>
    protected void Page_Load(object sender, EventArgs e)
           {
     
                
     
               DataTable nodeTable = new DataTable();
               nodeTable.Columns.Add("ID");
               nodeTable.Columns.Add("ParentID");
               nodeTable.Columns.Add("TeamName");
     
               nodeTable.Rows.Add(new String[] { "1", null, "Management" });
               nodeTable.Rows.Add(new String[] { "2", "1", "Unit" });
               nodeTable.Rows.Add(new String[] { "3", "2", "Dev" });
               nodeTable.Rows.Add(new String[] { "4", "2", "Research" });
     
               DataTable itemsTable = new DataTable();
               itemsTable.Columns.Add("NodeID");
               itemsTable.Columns.Add("ID");
               itemsTable.Columns.Add("Text");
               itemsTable.Columns.Add("Certificates");
     
               itemsTable.Rows.Add(new String[] { "1", "1", "CEO", "MCAD" });
               itemsTable.Rows.Add(new String[] { "1", "2", "CTO", "MCP" });
               itemsTable.Rows.Add(new String[] { "2", "3", "UnitManager", "MCSD" });
               itemsTable.Rows.Add(new String[] { "3", "4", "TeamLead", "MCTS" });
               itemsTable.Rows.Add(new String[] { "4", "5", "TechnicalLead", "MCP" });
     
               RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "ID";
               RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "ParentID";
               RadOrgChart1.GroupEnabledBinding.NodeBindingSettings.DataSource = nodeTable;
     
               RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "NodeID";
               RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ID";
               RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataTextField = "Text";
               RadOrgChart1.GroupEnabledBinding.GroupItemBindingSettings.DataSource = itemsTable;
     
               RadOrgChart1.DataBind();
           }


    Thanks,
    Jayesh Goyani
  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 21 Nov 2011 Link to this post

    Hello Jayesh,

    We just have fixed the issue.
    You will be able to get the change in the next Latest Internal Build.

    Regards,
    Nikolay Tsenkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top