on 06-04-2008 5:12 AM
Hi Expert,
I am trying to create a simple application in that i am using the 'tree' UI element . I want to write the some data in that tree element how can i do this
I want a code please its urgency
Thanks & Regards
Vijay Yewale
Hi,
Pl go through the following article
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Context:
Projects (node, 0:n)
-- name (string)
-- Components (node, 0:n, singleton=false)
---- name (string)
---- Objects (node, 0:n, singleton=false)
------ name (string)
UI element structure:
- Add Tree element with ID "Tree" into view.
- Add TreeNodeType elements with IDs "TreeNodeTypeProject", "TreeNodeTypeComponent" to tree.
- Add TreeItemType element with ID "TreeItemTypeObject" to tree.
UI element data binding:
Tree.dataSource = Projects
TreeNodeTypeProject.dataSource = Projects
TreeNodeTypeComponent.dataSource = Projects.Components
TreeItemTypeObject.dataSource = Projects.Components.Objects
Bind "text" properties to corresponding context attributes ("name")
Code to create context data:
IProjectsElement p1 = wdContext.nodeProjects().createAndAddProjectsElement();
p1.setName("Project1");
IComponentsElement c1 = p1.nodeComponents().createAndAddComponentsElement();
c1.setName("Component1");
for (int i = 0; i < 3; i++)
{
IObjectsElement o = c1.nodeObjects().createAndAddObjectsElement();
o.setName("Object" + i);
}
/* etc */
In older releases use createXYZElement() and addElement() instead of createAndAddXYZElement().
Armin
Added more details
thanks for the quick reply
i write this code in init() method and i create the context
but it not showing the "TreeNodeTypeProject" property it just showing the "TreeNodeType property"
and it slow not showing the "createandAddprojectElement()" property
what can i do
please Reply
thanks & Regards
vijay
hai Vijay,
This link shows a video presentation of tree UI element and recursive nodes creation
This link gives step by step procedure and codings
Any Issue plz do let me know.
Thanks n Regards
Sharanya.R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.