I have a table in a Livecycle form where new rows can be added and I need to add the functionality to delete a specific row from the table.
I have a button to add rows that works.
----- Root.Page3.EnterNewRows.HeaderRow[0]..Subform1.Button1[0]::click: - (JavaScript, client) ---------------
EnterNewRows._Detail.addInstance();
I have been able to add a button to delete a row but it only deletes the last row added.
----- Root.Page3.EnterNewRows.HeaderRow[0].Subform1.Button1[1]::click: - (JavaScript, client) --
EnterNewRows.Detail.instanceManager.removeInstance(1);
How do you remove a row (say the 3rd of 10)? Also how do you determine the index or row number of a row within the table? instanceManager.count does not seem to be available.
this.parent.instanceManager.removeInstance(this.parent.index);
You can find video tutorials that explain the LiveCycle scripting environment at www.pdfscripting.com
Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]
The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script