cancel
Showing results for 
Search instead for 
Did you mean: 

Adding rows to tables...

Former Member
0 Kudos

Hi all,

I am new to webdynpro java environment. i successfully added the columns to the talble. but i am not getting how to add rows. Please suggest me the solution for this.

regards,

shreeharsha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Friend,

You need to add row creator element to your table and need to write folloing code in its event handler.

wdContext.node<datanode>.createandAdddatanodeElement();

Regards

Jeetendra

Former Member
0 Kudos

hi,

how to add row creator element

regards,

shreeharsha

Former Member
0 Kudos

Hi Friend,

Just right click on table UI Element from outline and choose to add row creator.

Let us know if any issue.

Regards

Jeetendra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

consider you have a table with one column. You have binded it to a node called "Table" having a context attribute inside it called "Column1" . So your table will be binded to node "Table" and the column of table will be binded to attribute "Column1"

use the code below:

for(int i=0; i<5;i++)

{

IPrivatePerformanceappView.ITableElement ele = wdContext.nodeTable().createTableElement();

ele.setColumn1(""+i);

wdContext.nodeTable().addElement(ele);

}

Please Note: PerformanceappView is the name of my view and i have written this code in Doinit of my view. Please replace this name with your view name.

Result: you will see 5 rows in table with values 0 to 4.

Regards,

Utkarsh.

Edited by: utkarsh_SPARTA on Jan 21, 2010 7:56 AM

Former Member
0 Kudos

Hi,

Are you talking about adding rows to a dynamically created table in wddomodifyview?

Or you have created a table statically and want to add rows to it.

Regards,

Utkarsh.

Former Member
0 Kudos

Hi,

ya i created statically and want to add rows to it.