on 06-21-2008 12:45 PM
HI all,
I have a table with about 100 rows and 6 columns. I want to read each and every element of the table for implementing some checks and using each of them individually further. Could you please help me, how to do so.
Cheers Umang
Hi,
use the following code choose one of them based on your requirement
code is based on the node called "Orders" and its Elements so you need to change this according to yours
for(int x=0; x<wdContext.nodeOrders().size(); x++)
{
//Generic Approach
IWDNodeElement element = wdContext.nodeOrders().getElementAt(x);
Object obj = element.getAttributeValue("<Your Attribute Name>");
//Typed Approach
IOrdersElement element2 = wdContext.nodeOrders().getOrdersElementAt(x);
String type = element2.getOrderType();
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Suppose u have a node say ctx_va_table which is bound to ur table then use the following code to read each and every element of ur table.
for(int i=0;i<wdContext.nodeCtx_va_table ().size(); i++)
{
wdContext.nodeCtx_va_table ().setLeadSelection.(i);
wdContext.currentCtx_va_tableElement.getcolumn1();//replace column1..column6 by ur actual value attribute name
wdContext.currentCtx_va_tableElement.getcolumn2();
wdContext.currentCtx_va_tableElement.getcolumn3();
wdContext.currentCtx_va_tableElement.getcolumn4();
wdContext.currentCtx_va_tableElement.getcolumn5();
wdContext.currentCtx_va_tableElement.getcolumn6();
}
wdContext.nodeCtx_va_table ().setLeadSelection.(0);
Regards
Surender Dahiya
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 | |
9 | |
7 | |
6 | |
5 | |
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.