delete \add rows by button

khaldoona993089 06-01-2019

I have made buttons that adds and deletes rows on my Form

I have used this script to button ((add rows)):

Tablesons._Row1.addInstance ();

And this code to the button ((delete rows )) :

var vRows = Tablesons._Row.count-1;

for(var i=vRows;i>0;i--){

if (Tablesons.resolveNode("Row1[" + i + "]").Cell1.rawValue!==1) {

form1.main.Tablesons._Row1.removeInstance(i);

  }

}

===

the Add button works perfectly

but the delete button is do nothing..

what is the wrong with it  ?!

((Tablesons)) is the table name .

add delete rows.jpg