So very very close, please help. Table delete row, is deleting random rows

487 views
Skip to first unread message

DariusMDeV

unread,
Aug 6, 2008, 10:48:05 AM8/6/08
to Adobe LiveCycle Developers
I'm adding a file called TableTest to the file list


It is so close to perfect for my needs, except for 1 thing.


When you delete added rows, it just deletes a random row number, and
then when you add one, it starts repeating group numbers. So it
forces the user if they make a mistake to just start over and re-fill
the whole form, because the most important piece of data from the
table is the group number.


What have I done wrong? Is there a solution?

I'd like the delete row button to remove the LAST row and then if you
click add row, will add the next proper group number, not skip numbers
or repeat numbers.

sru...@gmail.com

unread,
Aug 7, 2008, 5:07:18 AM8/7/08
to Adobe LiveCycle Developers

hi...
i think you need to take the total instance count and subtract one
from it.... just try this code for your removeinstance...

var nCount = Table1.Row1.instanceManager.count ;
//remove instance
Table1.Row1.instanceManager.removeInstance(nCount-1);

Ramya...

Rae Buerckner

unread,
Aug 7, 2008, 5:11:27 AM8/7/08
to live...@googlegroups.com
Wouldn't this be more of a parent/child thing?

sru...@gmail.com

unread,
Aug 7, 2008, 7:09:47 AM8/7/08
to Adobe LiveCycle Developers
ya.. exactly... parent child relationship... we would have seen
scripts like

subform.instanceManager.removeInstance(this.parent.index);

but this is meant only to remove the current instance, which means
that we need to have remove buttons in each row of the table... it
depends on the look and feel we prefer...

Ramya...
> > > or repeat numbers.- Hide quoted text -
>
> - Show quoted text -

DariusMDeV

unread,
Aug 7, 2008, 10:35:52 AM8/7/08
to Adobe LiveCycle Developers
Srumin fixed it. Thanks!
Reply all
Reply to author
Forward
0 new messages