cancel
Showing results for 
Search instead for 
Did you mean: 

Looping through an context node

Former Member
0 Kudos

Hi,

I have created a context node which contain 9 attribute elements . These attributes are actually columns of my table. I want to loop through this table and take each row. Can anyone please tell the code to loop through this table node, so that i can take each row by row from my table.

Thanks,

shiny sunny

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

If Node Name is TableValues and it has attribute column1, column2, then the code to get the values will be like this.

for(int i=0;i<wdContext.nodeTableValues.size();i++)

{

     ITableValuesElement tvElement=wdContext.nodeTableValues().getTableValuesElementAt(i);

     tvElement.getColum1();

    tvElement.getColum2();

      //You can retrive more columns like this depends on the attribute you set to the Node

}

Answers (0)