Hi,
I'm using DiagramWebControl to show the organization chart, When I've tried to expand/shrink using the DiagramWebControl NodeDoubleClick event, rectangle is not showing properly as attached screen shot(DiagramWebControl_NodeDoubleClick.png) . But its (rectangle) showing correctly when I've use dropdown change event to do the level shrink, these are using without the master page.
Below is the code, please suggest and provide the sample source
DiagramWebControl1_NodeDoubleClick
void DiagramWebControl1_NodeDoubleClick(object sender, Syncfusion.Web.UI.WebControls.Diagram.NodeDoubleClickEventArgs e)
{
if (e.Node is EmpSymbol)
{
EmpSymbol expsymbol = (EmpSymbol)e.Node;
if (expsymbol.SubNodes.Count > 0)
{
this.DiagramWebControl1.Model.BeginUpdate();
if (expsymbol.IsExpanded == false)
{
expsymbol.ExpandSubNodes(true);
}
else
{
expsymbol.CollapseSubNodes(true);
}
this.DiagramWebControl1.Model.EndUpdate();
}
}
}
DropDown Event
protected void ddChartType_SelectedIndexChanged(object sender, EventArgs e)
{
int cnt = 0;
foreach (Node node in DiagramWebControl1.Model.Nodes)
{
if (node is EmpSymbol)
{
cnt++;
//lblNode.Text += cnt.ToString() + ",";
//if (cnt == 2)
//if (cnt == Convert.ToInt32(ddlExpandLvl.SelectedValue.ToString()))
EmpSymbol expsymbol = node as EmpSymbol;
if (expsymbol.EmpLevel == Convert.ToInt32(ddlExpandLvl.SelectedItem.Text))
{
expsymbol.CollapseSubNodes(true);
}
}
}
Attachment:
DiagramWebControl_a5385364.rar