Skip to Content
author's profile photo Former Member
Former Member

Multiple rows not working

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

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Aug 10, 2004 at 09:59 AM

    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

    Add comment
    10|10000 characters needed characters exceeded