on 04-10-2008 12:11 PM
Hi Experts,
I have created a blank table (1 column,6 rows)dyanamically.
Now I want to insert " *** " at perticular record(row).Say I want to insert " *** " in the 2nd record(row).
My table is a blank table.
Please suggest me.
Regards
-Sandip
Hi Sandeep,
You can create blank records like this:
for(int i=0;i<6;i++)
{
wdContext.node<nodename>().addElement(wdContext.create<node>Element());
}
If you have already created elements, then to insert value in a particular row (say i th row)
wdContext.node<nodename>().get<node>ElemenAt(i).set<attributename>("***");
regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandip, when the table is empty, you can create a node element (The table must be binding with a Node). The code to do this will be:
IPrivate<viewName>.I<nodeName>Element ele = wdContext.node<nodeName>.create<NodeName>Element();
ele.set<atributeElement>();
wdContext.node<nodeName>.add(ele);
You need this if the node's cardinality is 0..n.
After the Node has elements, you can get or set to an specific element with the next code:
wdContext.node<nodeName>.get<nodeName>ElementAt(<index>).get<atributeElement>();
wdContext.node<nodeName>.get<nodeName>ElementAt(<index>).set<atributeElement>();
The index refers to the position (row) of the table.
I hope this help you.
Best Regards,
Simon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Now I want to insert " *** " at perticular record(row).Say I want to insert " *** " in the 2nd record(row).
wdContext.node<YourNode>().setLeadSelection(2);
wdContext.current<YourContextElement>().setAttributeValue("<columnName>","****");
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
to have blank rows create element of the context and add to the context which in turn is bound to the table.
suppose u want to add a row to the second row....
u'll have to add first row first.
regards,
-Ag.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
just add some values into the context node, to which your table is binded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.