cancel
Showing results for 
Search instead for 
Did you mean: 

How to add a row to table dynamically?

Former Member
0 Kudos

Hi,

My requirement is............ i have one table which has 6 columns and one row initially... for each cell i will add a input field which is in edit mode.... so all the 6 columns in edit mode.... i will enter the data into the 6 columns and when i click on save the data has to save on r/3.....those 6 columns (one row) for one material details for perticular vendor....

if i want to insert another material details for the same vendor i need another row.... for that i need one button "add" .... when ever i click on add button one more row has to add (with same 6 columns) dynamically and entire row must be in edit mode...like that i can able to add as many rows as i required.... how to add these rows dynamically and all the rows which i have add dynamically must be in edit mode.... not reaOnly mode....

please help me....

Thanks & Regards

Ravi Shankar B.....

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Create a table with 6 columns as you require with InputField as tableCelleditors for those columns.

Assuming you have the DataSurceNode for table as follows

TableNode

|_Attr1

|_Attr6

Define the cardinality of the node as 1..n.This will give you one row initially.

Assign the Attr1 to Attr6 with the InputFields of the 6 columns.

on the event onAction of the button assign one action say Add.Write following code in that action

ITableNodeElement row = wdContext.nodeTableNode().createTableNodeElement();

wdContext.nodeTableNode().addElement(row);

Regards,

Ajay

Former Member
0 Kudos

You can also refer this thread :

Regards,

Subramanian V.

Answers (0)