cancel
Showing results for 
Search instead for 
Did you mean: 

Row Deletion

Former Member
0 Kudos

Dear All,

I have a scenario where my table on PDF has 'x' rows but when the form loads the requirement is if a particular cell is

blank the row should not be visible or hidden.

I have used Table.Row.instanceManager.removeInstance(i);

where i = index of the row to be deleted.

Unfortunately it removes all the rows in the table when it loads.

i have put this code inside a reverse for loop which goes from table length to 0.

What could be the problem??

Accepted Solutions (0)

Answers (2)

Answers (2)

OttoGold
Active Contributor
0 Kudos

this is not how it works, Geet.

You´d better manipulate the visibility only. Something like this.presence = "hidden"; placed on the initializae of every row (I mean the only row you can see at design time), of course you may like it to add you condition, so the result is like:

if (this.hideTheRow = 'X') { this.presence = "hidden"; }

regards Otto

Former Member
0 Kudos

Hi All,

I have used the following code on the initialize event of Row

xfa.host.messageBox("Value:"+this.Column_Name.rawValue);

if (this.Column_Name.rawValue == null)

{

this.presence = "hidden";

}

the values are absolutely fine...but finally all the rows are gone.

Regards,

Geet

OttoGold
Active Contributor
0 Kudos

Are you sure about the condition? Works the same way as your first idea: removes/ hides all the rows, what means that the column used in the condition is never filled with value.

Regards Otto

Former Member
0 Kudos

I have used message box to give me the run time value...there are 3 rows having the value and the remaining are blank

the column is getting populated correctly...

Everything is perfectly in place...

Is there anything else that can go wrong

Regards,

Geet

OttoGold
Active Contributor
0 Kudos

That sounds weird... I have no more ideas. You can send the form, if you want, to let me check it, but I have no suggestions without any more information... Sorry. Otto

Former Member
0 Kudos

Thanks for the replies...but couldnt find the solution yet...closing the thread.

Geet

BenPatterson
Participant
0 Kudos

Hi Geet,

could you please post the particular code in question?

The most likely issue is that the condition used to check that the cell is blank is always returning true and therefore deleting all rows. You can use the alert function to help debug this.

Regards,

Ben

Edited by: Ben Patterson on Aug 16, 2010 3:18 AM