cancel
Showing results for 
Search instead for 
Did you mean: 

Remove all the rows in table

sureshmandalapu6
Active Contributor
0 Kudos

Hi Experts,

I have a requirement of removing all the rows in a table no matter whether they selected or not . How to do it throgh programming. I tried using the corresponding node.invalidate() method. but ! data is not going in the table at front end .

any help please

thanks

Suresh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

if table bind with value node use invalidate() .

if it is bind with modal node use,

IPrivate<view name>.ITaleNode iTableNode = wdContext.nodeTable();

for (int i = iTableNode.size(); i > 0; i--){

iTableNode.removeElement(iTableNode.getElementAt(i - 1));

}

Regards,

ramesh

sureshmandalapu6
Active Contributor
0 Kudos

Thanks for the reply ramesh,

I am using model node binded with table and I wrote the code that you have mentioned, but ! even though I am unable to clear the rows in table at front end.

plese help

thanks

Suresh

Former Member
0 Kudos

hi ,

use the below code

IPrivate<view name>.ITaleNode iTableNode = wdContext.nodeTable();

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

{

iTableNode.removeElement(iTableNode.getElementAt(0));

}

Regards,

Sunitha

Former Member
0 Kudos

hi ,

use the below code

IPrivate<view name>.ITaleNode iTableNode = wdContext.nodeTable();

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

{

iTableNode.removeElement(iTableNode.getElementAt(0));

}

Regards,

Sunitha

Former Member
0 Kudos

once check the dataSource property bind with the same node you using in the code.

sureshmandalapu6
Active Contributor
0 Kudos

yes ramesh. It is the same which I used.

thanks

Suresh

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Suresh,

Check the datasource property of table, if it is correctly binded to the node. Then just try with remove element in loop like

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

{

wdContext.node<<abc()>>.removeElement(wdContext.nodeabc().getabcElementat(i));

}

Regards

Raghu

sureshmandalapu6
Active Contributor
0 Kudos

Everything is correct.

but ! it is not clearing the rows at table.

any clue

thanks

Suresh

Former Member
0 Kudos

Hi,

after remove code ,

you executing the rfc again ?

Former Member
0 Kudos

Hi Suresh ,

Instead of getElementAt(i) try getElementAt(0)

Regards,

Sunitha Hari

Former Member
0 Kudos

hi,

i hope u want to invalidate the table data upon some action...

jus make sure u r writing the code to invalidate in the correct place.

or if u dont want the data to be displayed at all(i,e as soon as the output screen is rendered) write the code in wdDoInit method.

Regards,

Satya.