Hello all,
In the picture, Row 2 is the sub row of the Row 1.
The two buttons at the top which can add the particular row in the table.
I can add the row 1 by this script --> this.resolveNode('Table1._Row1').addInstance(1);
1) But i have no idea to success on "+Row2" button?
2) and how to delete the specific row when clicking on the "-" button?
If anyone know something, please tell me.
Thanks a lot.
Views
Replies
Total Likes
Assure Dynamics has some great sample table forms that might help. Find them here:
http://www.assuredynamics.com/wp-content/uploads/2010/11/Assure-Dynamics-Building-dynamic-tables.pdf
Views
Replies
Total Likes
I don't know if it's possible to mix rows in a table like you have there, at least not easily...it might be possible with some fancy scripting. You can replicate what you are trying to do by building your table out of repeating subforms and then you'll have control over what goes where.
To delete the row that the button is in you can use:
_RowName.removeInstance(this.parent.index);
Views
Replies
Total Likes
Thanks jeanette,
The link is awesome and very helpful.
Views
Replies
Total Likes
Dear Jono Moore,
Thanks for your reply.
You said to delete the row that the script in the button is as follow:
_RowName.removeInstance(this.parent.index);
fox example, if my row name is called "Row1", then script in the button is like follow:
_Row1.removeInstance(this.parent.index);
but it is not work, am i missing something else?
and "this.parent.index" means???
Thanks.
Views
Replies
Total Likes
this.parent.index is trying to find the index of the row or subform the object is in so you can delete that particular row or subform.
If the object is more than one level below the row (it may be in another subform or more) you'll need to add more parents. So if your delete button is in a subform that is in a table row then you would need to use this.parent.parent.index.
If you look through the tutorials on the Assure Dynamics site Niall has some great examples of how this all works.
Views
Replies
Total Likes
Dear Jono Moore,
Appriciate to your reply and explain.
Thank a lot.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies