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