cancel
Showing results for 
Search instead for 
Did you mean: 

Delete table row but retain values in the row

Former Member
0 Kudos

Dear All

I have a scenerio in which user can delete entries in the table.

As soon as he selects the rows to be deleted and performs delete action, corresponding rows gets deleted along with its elements/ values.

My requirement is that users should not see the deleted rows but entries should remain in the node as those still needs to be passed to RFC along with a flag.

I do not want to use an extra value node as this results in un-necessary looping which affects performance.

Can anybody help me with this.

Regards

Vineet Vikram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You could "move" the deleted entries to another node that has the same structure. Later, when writing data back, move the deleted entries back to the original node.

Another possibility (NW04s and later): Use table row grouping and provide two groups, "available" and "deleted". Move the deleted entries into the "deleted" group.

Armin

Former Member
0 Kudos

Hi Armin

How to do table row grouping and provide two groups, "available" and "deleted". Move the deleted entries into the "deleted" group.

Also, I got a reply to my another query for copying tables.

" You can use WDCopyService.copyElements(wdContext.nodeSource(), wdContext

.nodeTarget());"

Will this replace the elements already present in the target node or it will just append the source into the target ?

My target node contains some rows that are not to be deleted/ replaced.

Regards

Vineet Vikram

Former Member
0 Kudos

Before giving an answer to this please tell me which release your are working on. Table row grouping is not available in NW04.

Armin

Former Member
0 Kudos

Hi

I´m working on NW2004s

Regards

Vineet Vikram

Former Member
0 Kudos

I just checked the Javadoc and found that TableRowGrouping is only availabe in NW 7.1, not in NW 7.0 (=04s). So you might try my other proposal (moving deleted node elements to another node and restoring before submit).

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Using Tables VisibleRowCount property u can Delete table row but retain values in the row ..

Create a Value Attribute of type integer and bind it to the VisibleRowCount of the Table.

Intially get the node size of the table and set this value to the value attribute.

i.e wdContext.currentContextElement().setTableSize(<get nodes sixe>);

on Delete Action decrease the Table Size.

int size = wdContext.currentContextElement().getTableSize();

wdContext.currentContextElement().setTableSize(size-1);

Regards,

Sunitha Hari.

Former Member
0 Kudos

Hi Sunita

Thanks for your reply.

Users can select the rows at random using the check boxes in the table and can delete the rows.

Setting the visible row count will not stop users from watching the rows that are deleted.

Regards

Vineet Vikram

Former Member
0 Kudos

Hi Vineet,

When u select the row, lead select will be called. If u want to delete the row at that point of time, its not possible i think bcos for removing the row from the table , u need to refresh the table.If the data is avaialble in the node , it will again show that data.

Better to put a remove or delete button & use that for deleting the row.

regards

Sumit

Edited by: Sumit Malhotra on Apr 3, 2008 5:41 PM