Setting/Establishing the Parent and child relationship using the
Codebehind values and Drawing the Chart
Hi,
I am creating the Organization Chart using JQuery dll and C# dll's for
that i am passing the the Code in aspx.cs file using the following code
like
BasicPrimitives.OrgDiagram.Item ParentObj= new
Item(itemName,CurrentId,ParentId,GroupId);
this.OrgDiagram.Items.Add(ParentObj);
BasicPrimitives.OrgDiagram.Item ChildObjOne= new
Item(itemName,CurrentId,ParentId,GroupId);
this.ParentObj.items.Add(ChildObjOne); // Here by adding like this we
are specifying that this parent Object for this item is "ParentObj"
Butting adding the items using the code behind ,is not a good idea . I am
loading the Data form database dynamically. so based on "CurrentId" and
"ParentId" values i need to set the relation.
Please suggest me the code to how to write it to establish the parent
child relation ship based on Datatable values without creating the code
like above in codebehind... ( here i need to avoid
this.ParentObj.items.Add(ChildObjOne); hard coding.)
Thank you.
No comments:
Post a Comment