cancel
Showing results for 
Search instead for 
Did you mean: 

Insert record at a selected row in a non-empty table

Former Member
0 Kudos

Hi,

Please let me know how I can insert a record at a particular row in the non-empty table,say above or below a leadSelected row.

(the API createAndAddelement()inserts a new row at the end of the table)

Awaiting your kind responses.

Regards,

Mahesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mahesh,

There's the method:

addElement(int index, IWDNodeElement element)

Which adds an element to the node collection at the given index.

You can pass myNode.getLeadSelection() + or - 1 as the int param to insert an element above or below the leadSelected row.

I hope this helps,

Patrick.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Mahesh,

Use the method

wdContext.node<<i>yourNode</i>>addElement(int arg0, IWDNodeElement arg1)

to add the element at the required index. Assign the required row number to <b><i>arg0</i></b>.

Warm Regards,

Bala