Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > OrgChart > Second Row in Group Style Issue

Answered Second Row in Group Style Issue

Feed from this thread
  • Chris Salas avatar

    Posted on Jan 19, 2012 (permalink)

    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();

    Reply

  • Chris Salas avatar

    Posted on Jan 23, 2012 (permalink)

    Anyone?  

    Reply

  • Peter Filipov Peter Filipov admin's avatar

    Posted on Jan 24, 2012 (permalink)

    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

    Reply

  • Chris Salas avatar

    Posted on Jan 24, 2012 (permalink)

    Peter,

    Here is what I am seeing.  Could it have something to do with it being inside a tabstrip or mulitpage?
    Attached files

    Reply

  • Answer Peter Filipov Peter Filipov admin's avatar

    Posted on Jan 26, 2012 (permalink)

    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
    Attached files

    Reply

  • Chris Salas avatar

    Posted on Jan 26, 2012 (permalink)

    Peter,

    This worked perfect.  I just had to add ClientIDMode="Static" to the org chart.  Thank you for your assistance.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > OrgChart > Second Row in Group Style Issue
Related resources for "Second Row in Group Style Issue"

ASP.NET OrgChart Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]