Highlighted

How to clear the contents of a row

Avatar

Avatar

_jadobe_

Avatar

_jadobe_

_jadobe_

27-01-2009

Hi Friends,

I have a table with around 10 rows and those rows have different fields.

when the user clicks the "Delete" button, the users should be able to delete the field values of that row..

Is there any easy way to achieve this, like deleting the whole row contents in once, instead of going into each field to deleting the contents..



Thanks

JJ

Replies

Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

27-01-2009

Are you trying to simply clear the fields in the row or delete the entire row (i.e if I have 10 rows and I delete a row I now have 9)?
Highlighted

Avatar

Avatar

_jadobe_

Avatar

_jadobe_

_jadobe_

27-01-2009

Hi Paul,

Thanks again for trying to help me.

I wish to clear the fields in the row and once deleted there will be only 9 rows ( basically i will be hiding the deleted row once after clearing the field contents).



Thanks

JJ
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

27-01-2009

Then simply remove the instance of the row and all data will disappear with it. You can use a removeInstance(instance Number) to accomplish this.
Highlighted

Avatar

Avatar

_jadobe_

Avatar

_jadobe_

_jadobe_

27-01-2009

Hi Paul,

Do you have a sample code to share with me..

My code did not worked..



Thanks
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

28-01-2009

subformName.instanceManager.removeInstance(instance number to remove)



Note the instances are 0 based.
Highlighted

Avatar

Avatar

_jadobe_

Avatar

_jadobe_

_jadobe_

28-01-2009

Hi Paul,

my subforms are too deep from form like..

form1.subform1.subform2.subform3 and the delete button is in subform2 and i wish to remove the contents of subform3..



if that is the case how the code will look like..



Thanks

JJ
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

28-01-2009

So if you use:



form1.subform1.subform2.subform3.instanceManager.removeInstance(instance number).
Highlighted

Avatar

Avatar

_jadobe_

Avatar

_jadobe_

_jadobe_

28-01-2009

Hi Paul,

Sorry to say that, i am not using instance manager to create subfroms, the about code only removes that instance.



I have each 10 subforms inbuilt, i mean to say only one will be visible at a time and needs a script to remove the contents.



I found that xfa.host.resetData(fieldnames)can achieve this but still

looking for a script to get all the field names of the subform.



if you have any script which gets all the field names in a subform please share with me.



Thanks

JJ
Highlighted

Avatar

Avatar

Aditya_S_

Avatar

Aditya_S_

Aditya_S_

20-02-2009

Paul - On a similar note, I have a static table with 11 rows and I would like to remove form1.Table1.Row3



What will be the syntax ? I tried using




form1.Table1.instaceManager.removeInstance(form1.Table1.Row3);



but it didn't work



Any suggestions ?



Aditya