Add image OrgChart from XML

3 posts, 0 answers
  1. amir
    amir avatar
    4 posts
    Member since:
    Feb 2011

    Posted 04 Feb 2013 Link to this post

    Dear,
    please i would like to ask one question about RadOrgChart xml

            which is what is the node name of the image

            what i mean i need to add node image to this node   <Node> 
                 

            <Node> 

                <Fields>

                    <Field Text="Boss" />

                </Fields>

                <Items>

                    <Item Text="Boss name" />

                </Items>

             what is the this node name ?

    best regards
  2. amir
    amir avatar
    4 posts
    Member since:
    Feb 2011

    Posted 06 Feb 2013 Link to this post

    Can anyone from the Telerik team reply to this post.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Plamen
    Admin
    Plamen avatar
    2734 posts

    Posted 07 Feb 2013 Link to this post

    Hi Amir,

     
    You can change set the ImageUrl of the item by setting its property as in the code below:

    <telerik:RadOrgChart runat="server" ID="RadOrgChart1">
               <Nodes>
                   <telerik:OrgChartNode>
                       <RenderedFields>
                           <telerik:OrgChartRenderedField Text="CEOs" />
                       </RenderedFields>
                       <GroupItems>
                           <telerik:OrgChartGroupItem Text="John Bravo" />
                           <telerik:OrgChartGroupItem Text="Nancy Davolio" />
                           <telerik:OrgChartGroupItem Text="Andrew Fuller" />
                       </GroupItems>
                       <Nodes>
                           <telerik:OrgChartNode>
                               <GroupItems>
                                   <telerik:OrgChartGroupItem Text="Don Marko">
                                       <RenderedFields>
                                           <telerik:OrgChartRenderedField Text="Team Leader" />
                                       </RenderedFields>
                                   </telerik:OrgChartGroupItem>
                               </GroupItems>
                               <Nodes>
                                   <telerik:OrgChartNode ColumnCount="2">
                                       <GroupItems>
                                           <telerik:OrgChartGroupItem Text="Hun-ni Ho" ImageUrl="~/Img/Northwind/Customers/ALFKI.jpg" />
                                           <telerik:OrgChartGroupItem Text="Lukas Brezina" />
                                           <telerik:OrgChartGroupItem Text="Viktor Varga" />
                                           <telerik:OrgChartGroupItem Text="Marianna Weissova" />
                                       </GroupItems>
                                   </telerik:OrgChartNode>
                               </Nodes>
                           </telerik:OrgChartNode>
                           <telerik:OrgChartNode>
                               <GroupItems>
                                   <telerik:OrgChartGroupItem Text="Sara Darkman">
                                       <RenderedFields>
                                           <telerik:OrgChartRenderedField Text="Team Leader" />
                                       </RenderedFields>
                                   </telerik:OrgChartGroupItem>
                               </GroupItems>
                               <Nodes>
                                   <telerik:OrgChartNode ColumnCount="2">
                                       <GroupItems>
                                           <telerik:OrgChartGroupItem Text="David Maly" />
                                           <telerik:OrgChartGroupItem Text="Lin-Sheng Fen" />
                                       </GroupItems>
                                   </telerik:OrgChartNode>
                               </Nodes>
                           </telerik:OrgChartNode>
                       </Nodes>
                   </telerik:OrgChartNode>
               </Nodes>
           </telerik:RadOrgChart>

    Hope this will be helpful.

    Greetings,
    Plamen
    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.
Back to Top