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

Adding new row to Table

Hi

I created design time table with 3 columns and 10 rows

and i created one button with "Add" label

at runtime when click a "Add" button then it should add a empty row to the table with 3 columns

please let me know this functionality

regards

mmukesh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jan 15, 2007 at 02:23 PM

    sorry but post like this are really tedious.

    Did you tried to do a search into forum?

    To read some PDF document?

    This is the start point:

    https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 02:24 PM

    Hi

    Context definition at design time

    Context example: Name list with the 12 months of a year.

    The value node in the example below is defined as follows:

    Value node "MonthsOfYear", collection type=list, cardinality=0..n, selection=0..n

    and the attribute:

    Value attribute "MonthName”, type=”String”.

    In WD modify Veiw add this code

    IWDTransparentContainer container = (IWDTransparentContainer)

    view.getElement(IWDTransparentContainer.class, "RootUIElementContainer");

    IWDTextView editor = (IWDTextView)

    view.createElement(IWDTextView.class, "monthNameColumnEditor");

    editor.bindText("MonthOfYear.MonthName");

    IWDTableColumn column = (IWDTableColumn)

    view.createElement(IWDTableColumn.class, "monthNameColumn");

    column.setTableCellEditor(editor);

    IWDTable table = (IWDTable)

    view.createElement(IWDTable.class, "MyTable");

    table.bindDataSource("MonthsOfYear");

    table.addColumn(column);

    container.addChild(table);

    Or ur not getting go thru this link

    http://help.sap.com/saphelp_erp2005vp/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm

    I think so it would help only one time only.

    Thanks,

    Lohi.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 15, 2007 at 03:00 PM

    in the action for ADD give the below code

    ITableElement hh = wdContext.createTableElement();

    hh.setAttr1("");

    hh.setAttr2("");

    hh.setAttr3("");

    wdContext.nodeTable().addElement(hh);

    or use the below

    ITableElement hh = wdContext.createTableElement();

    wdContext.nodeTable().addElement(hh);

    Regards

    AM

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.