Hi
I am replicating table dynamically using
this.resolveNode('form1.#subform._subForm2').addInstance(1);
if (xfa.host.version <
{
xfa.form.recalculate(1);
}
When I try to delete the current table instance using
this.resolveNode('form1.#subform._subForm2').removeInstance(this.parent.index);
if (xfa.host.version <
{
xfa.form.recalculate(1);
}
results in always deleteting the first instance ( table )
Any help ?
I have a table with a button "Duplicate Table" and "Delete Table"
If user clicks on "Duplicate Table" it creates/replicates/duplicates the entire table with all the fields and the buttons.
Now from the user perspective suppose I have created/duplicated 5 tables with all the data fields and buttons ( please note each of the newly created table will also have their individual "Delete Table" option). Now I want to delete the third table using the "Delete Table" from the third table ( want to delete the same instance from which the button is clicked deleted .
Views
Replies
Total Likes
Recheck your line:
this.resolveNode('form1.#subform._subForm2').removeInstance(this.paren t.index);
Replace this.parent.index with the name of the subform you are deleting. (ex: myParentTable.index);
or
Find how far down your delete button is in the hierarchy. For example if my delete button is wrapped in Subform1 and Subform1 is inside of TableToRemove then your syntax would have to be removeInstance(this.parent.parent.index) because the subform you want to remove is 2 parents up.
Kyle
Views
Replies
Total Likes