cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple rows not working

Former Member
0 Kudos

Hi ,

This is the code which i have tried for inserting new rows into table on add row button.

In the init method of the controller Bapisditm items = new Bapisditm();

input.addOrder_Items_In(items);

The above code enables one row in the table.

When i try to add a new row with the add button.

the following piece of code doesent work.

In the AddRow event

Bapisditm line = new Bapisditm();

wdContext.nodeOrder_Items_In().createOrder_Items_InElement(line);

When i bind the above value to the context the first row is replaced by an blank row.

Any tips???

thanks & regards.

Atul Sable

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Atul,

i answered this already in another thread.

Bapisditm items = new Bapisditm();
input.addOrder_Items_In(items);

adds the initial empty row to the node.

In the AddRow event code:

Bapisditm line = new Bapisditm();
IOrder_Items_InElement el = wdContext.nodeOrder_Items_In().createOrder_Items_InElement(line);
<b>wdContext.nodeOrder_Items_In().addElement(el);</b>

will add a second one. Don't use bind with a single element, since it removes all existing entries and adds the single one as new.

Hope that helps.

Stefan