Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
I can remove individual instances of a row, using Javascript
Row.instanceManager.removeInstance(rowIndex)
but now I want to make sure that the last row left cannot be deleted. I tried using
if
(Table.Row.instanceManager.count > 1) then
var rowIndex = $.parent.index;
Row.instanceManager.removeInstance(rowIndex);
endif
but now none of the rows will delete.
What am I doing wrong?
Views
Replies
Total Likes
Try...
if (this.parent.index > 0) then
_Row.removeInstance(this.parent.index);
endif
Steve
Views
Replies
Total Likes
Hmm, tested but that allows only the removal of the top row in the table.
I need the user to be able to remove any given row but I also don't want them to remove the 1 remaining row.
Views
Replies
Total Likes
That is not the behaviour I see in the attached where the JavaScript on the delete button is as follows:
// form1.purchaseOrder.detail.deleteItems::click - (JavaScript, client)
xfa.host.messageBox("count " + purchaseOrder._detail.count);
xfa.host.messageBox("parent index " + this.parent.index);
if (this.parent.index > 0) {
xfa.host.messageBox("deleting parent index" + this.parent.index);
_detail.removeInstance(this.parent.index);
}
Views
Replies
Total Likes
I can't open the attachment you are referring to.
I've attached the form I am working with. The problem we have is that if the user deletes all the rows then they can't add one back in which is why I want 1 row to stay and not be able to be deleted.
Views
Replies
Total Likes
This new forum software is really getting under my skin. The attachments are getting queued so they can be run against a virus scanner. Unfortunately it seems competely random as to when, or if, the virus scanner processes the attachments and releases them for sharing.
Can you please forward your form to stwalker.adobe@gmail.com. I can take a look and respond with my sample.
Steve
Views
Replies
Total Likes
Just set your min count to 1 in the subform object palette properties. This will ensure that you will always have one occurance
Paul
Views
Replies
Total Likes
Views
Like
Replies
Views
Likes
Replies
Views
Likes
Replies