Embed Radgrid Control & Alter ItemTemplate Height

2 posts, 0 answers
  1. Developer
    Developer avatar
    38 posts
    Member since:
    Apr 2014

    Posted 28 Aug 2015 Link to this post

    Hi,

    I have an orgchart setup like this:

     

    <telerik:RadOrgChart ID="RadOrgChart1"runat="server"OnNodeDataBound="RadOrgChart1_NodeDataBound"
               Skin="Metro">
               <ItemTemplate>
                   <divstyle="height: 50%">
                       <span>Name:
                           <%#DataBinder.Eval(Container.DataItem, "Name")%></span>
                       <br/>
                       <span>
                           <%#DataBinder.Eval(Container.DataItem, "role")%></span>
                       <telerik:RadGrid ID="RadGrid1" runat="server"OnNeedDataSource="RadGrid1_NeedDataSource">
                       </telerik:RadGrid></div>
               </ItemTemplate>
           </telerik:RadOrgChart>



    I’d like to have a radgrid embeded into each node, however to do this I need to grab the ID of the node from the RadGrid1_NeedDataSource event.
    Can someone please advise how I can do this please?
    Also is there any way to increase the item template height?

     
  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 02 Sep 2015 Link to this post

    Hello,

    You can enlarge the NodesTemplates using css and the following approach:

    <style type="text/css">
            html .rocGroup {
                height: 450px;
            }
     
            .rocItemTemplate {
                height: 400px !important;
            }
        </style>

    As for your other question about acquiring the IDs of the nodes - could you specify the biding approach for the RadOrgChart that you use, so we could get a clearer picture on your scenario?

    Regards,
    Nencho
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top