cancel
Showing results for 
Search instead for 
Did you mean: 

How to Edit ,Insert, delete rows in table without backend

Former Member
0 Kudos

hi,

i want to build an application where i need to insert,delete,edit the table with in the view. But i don't want to use any backend.

I have two views one in which i have all the InputFields for the relevent column of the table.Once i enter data in the InputFields and click insert button The data should get in to the table

And in the second view i.e., table view if i select one particular row i should be able to delete or edit after clicking delete button or Edit button.

But every thing i want to do it hardcoded except the UI Elements and contexts. could anybody help me out of this situation.

Thanks

Kalyan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

For addition use :

IPrivate<ViewName>.I<NodeName>Node node1 = wdContext.node<NodeName>;

loop

IPrivate<ViewName>.I<NodeName>Element Element = node1.create<nodeName>Element();

<nodeName>Node.addElement(<NodeName>Element);

endloop

On action method of delete

int i = node1.getLeadSelection;

IPrivate<ViewName>.I<NodeName>Element Element = <nodeName>Node.getElementAt(i);

<nodeName>Node.removeElement (element);

For edit use same as delete except set values there

Former Member
0 Kudos

Hi Deepak,

I am able to solve the problem with the code that u have sent Thanks for ur help

Thanks

Kalyan

Answers (2)

Answers (2)

Former Member
0 Kudos

Kalyan,

create a context node and add all value attributes you need to this node.

At runtime you can modify the content of the context node with


IPrivate<YOUR_VIEW>.I<YOUR_ELEMENT> e =
				wdContext.create<YOUR_ELEMENT>();
		e.setAbc(...);
		e.setXyz(...);
	
wdContext.nodeTaskInstance().addElement(e);

Delete and Modify is equivalent.

Regards

Sebastian

Former Member
0 Kudos

Use a value node, bind the table and the input fields to the attributes of that node.

Insert: Create and add node element

Delete: Delete lead-selected element

Edit: Set lead-selection

Armin