This is a migrated thread and some comments may be shown as answers.

Second Row in Group Style Issue

5 Answers 115 Views
OrgChart
This is a migrated thread and some comments may be shown as answers.
Chris Salas
Top achievements
Rank 1
Chris Salas asked on 19 Jan 2012, 04:14 PM
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();

5 Answers, 1 is accepted

Sort by
0
Chris Salas
Top achievements
Rank 1
answered on 23 Jan 2012, 10:24 PM
Anyone?  
0
Peter Filipov
Telerik team
answered on 24 Jan 2012, 09:53 AM
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
0
Chris Salas
Top achievements
Rank 1
answered on 24 Jan 2012, 09:24 PM
Peter,

Here is what I am seeing.  Could it have something to do with it being inside a tabstrip or mulitpage?
0
Accepted
Peter Filipov
Telerik team
answered on 26 Jan 2012, 12:48 PM
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
0
Chris Salas
Top achievements
Rank 1
answered on 26 Jan 2012, 03:13 PM
Peter,

This worked perfect.  I just had to add ClientIDMode="Static" to the org chart.  Thank you for your assistance.
Tags
OrgChart
Asked by
Chris Salas
Top achievements
Rank 1
Answers by
Chris Salas
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or