cancel
Showing results for 
Search instead for 
Did you mean: 

Deleting rows from design time binded table

Former Member
0 Kudos

Hi All

I have context with node and this is binded to a table at design time. How can I delete some of the rows from it. I tried to have below code in wdinit of view controller and doModify method. Though I am deleting rows I am able to see all records in table. Can any one suggest me solution for this


for (int i = 0; i < wdContext.nodeZdetail().size(); i++) {				
				
		
						IPrivateShipmentPopUpView.IZdetailElement ele=wdContext.nodeZdetail().getZdetailElementAt(i);
			
						if(cond)
						{
							wdContext.nodeZdetail().removeElement(ele);
				
						}




Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First, the fact that the data binding has been defined at design time has nothing to do with the content of the table. The content is always determined at runtime by the elements in the data source node.

When deleting node elements in a loop, you have to take care that the indices are stable. You can achieve this for example by looping backwards, e.g.

IWDNode node = wdContext.node<Node>();
for (int i = node.size() - 1; i >= 0; --i)
{
  IWDNodeElement e = node.getElementAt(i);
  node.removeElement(e);
}

Armin

Answers (0)