Second Row in Group Style Issue

6 posts, 1 answers
  1. Chris Salas
    Chris Salas avatar
    46 posts
    Member since:
    Oct 2009

    Posted 19 Jan 2012 Link to this post

    I am creating the OrgChart using the demos found and i have come to a style issue with the second and subsequent rows for a group.  When i set the DisableDefaultImage to true the subsequent rows are still showing the placeholder for the image.  Is there something wrong in my code?  Please review:

    <telerik:RadOrgChart ID="radOrgChart" runat="server" GroupColumnCount="4" DisableDefaultImage="true" Skin="Sitefinity">
        <RenderedFields>
            <ItemFields>
                <telerik:OrgChartRenderedField DataField="FullName"/>
                <telerik:OrgChartRenderedField DataField="Title" />
                <telerik:OrgChartRenderedField DataField="ProfileLink" />
            </ItemFields>
        </RenderedFields>
    </telerik:RadOrgChart>
    //Table to define the nodes
    DataTable nodeTable = new DataTable();
    nodeTable.Columns.Add("ID");
    nodeTable.Columns.Add("ManagerID");
     
    //Table to hold the data for the items
    DataTable itemsTable = new DataTable();
    itemsTable.Columns.Add("NodeID");
    itemsTable.Columns.Add("ID");
    itemsTable.Columns.Add("FullName");
    itemsTable.Columns.Add("Title");
    itemsTable.Columns.Add("ProfileLink");
     
    //Get Contacts Manager
    var tmpCM = ContactMgr.GetContactByID(ContactToDisplay.ManagerID);
     
    //Get Contacts Managers manager
    var tmpCMM = ContactMgr.GetContactByID(tmpCM.ManagerID);
     
    //Get Contacts Managers employees
    var tmpCME = ContactMgr.GetEmployeesByManagerID(tmpCM.ID);
     
    //Add the nodes to the nodesTable
    nodeTable.Rows.Add(new string[] { "1", null});
    nodeTable.Rows.Add(new string[] { "2", "1"});
    nodeTable.Rows.Add(new string[] { "3", "2" });
     
    //Add the details of the employees to the itemTable
    itemsTable.Rows.Add(new string[] { "1", tmpCMM.ID.ToString(), "<b>" + tmpCMM.FullName + "</b>", tmpCMM.Title, "<a href='/contacts/detail.aspx?id=" + tmpCMM.ID + "'>View Details</a>" });
    itemsTable.Rows.Add(new string[] { "2", tmpCM.ID.ToString(), "<b>" + tmpCM.FullName + "</b>", tmpCM.Title,  "<a href='/contacts/detail.aspx?id=" + tmpCM.ID + "'>View Details</a>" });
    foreach (Directory_BO.Contact tmpC in tmpCME)
        itemsTable.Rows.Add(new string[] { "3", tmpC.ID.ToString(), "<b>" + tmpC.FullName + "</b>", tmpC.Title,  "<a href='/contacts/detail.aspx?id=" + tmpC.ID + "'>View Details</a>" });
     
    //Setup the relationships within the OrgChart
    radOrgChart.GroupEnabledBinding.NodeBindingSettings.DataFieldID = "ID";
    radOrgChart.GroupEnabledBinding.NodeBindingSettings.DataFieldParentID = "ManagerID";
    radOrgChart.GroupEnabledBinding.NodeBindingSettings.DataSource = nodeTable;
     
    radOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataFieldNodeID = "NodeID";
    radOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataFieldID = "ID";
    radOrgChart.GroupEnabledBinding.GroupItemBindingSettings.DataSource = itemsTable;
     
    //Bind the OrgChart
    radOrgChart.DataBind();
  2. Chris Salas
    Chris Salas avatar
    46 posts
    Member since:
    Oct 2009

    Posted 23 Jan 2012 Link to this post

    Anyone?  
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 24 Jan 2012 Link to this post

    Hi Chris,

    I tested your sample code with the latest version of our controls and everything is rendered correct. No image wrappers are rendered. Please note that the rendered DIV element has a rocNoOwnImage class.

    Regards,
    Peter Filipov
    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
  5. Chris Salas
    Chris Salas avatar
    46 posts
    Member since:
    Oct 2009

    Posted 24 Jan 2012 Link to this post

    Peter,

    Here is what I am seeing.  Could it have something to do with it being inside a tabstrip or mulitpage?
  6. Answer
    Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 26 Jan 2012 Link to this post

    Hello Chris,

    I was able to reproduce the problem in a simple scenario only with RadOrgChart. The image container is still not rendered, but the rocNoOwnImage is not added to the Item. It appears like there is a place for an image.
    I prepared a workaround for you. Please review the attached project - in the project I am adding rocNoOwnImage class to every item.

    Otherwise I logged the issue and we will investigate it further.

    As a gratitude for pointing this out I updated your telerik points.

    Regards,
    Peter Filipov
    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
  7. Chris Salas
    Chris Salas avatar
    46 posts
    Member since:
    Oct 2009

    Posted 26 Jan 2012 Link to this post

    Peter,

    This worked perfect.  I just had to add ClientIDMode="Static" to the org chart.  Thank you for your assistance.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017