Expand my Community achievements bar.

Insert data into a Dynamic table?

Avatar

Level 2

I create a dymanic table.

how do go about inserting data into it?

Example:

for(int i = 0; i < 10; i++)

{    

     form1.Table1.Row1.Text1.rawValue = i;

     //form1.Table1.Row[i].Text1.rawValue = i;  // not working

     form1.Table1._Row1.addInstance(1);

}

xfa.form.recalculate(1);

Any help is appreciated!

Paul

4 Replies

Avatar

Level 10

Try like this..

Assuming the Row name is "Row1"..

for(int i = 0; i < 10; i++)

{   

     form1.Table1.resolveNode("Row1[" + i + "]").Text1.rawValue = i;

     form1.Table1._Row1.addInstance(1);

}

Thanks

Srini

Avatar

Level 2

Srini,

Thank you for your response but it still not working...

for

(var i = 1; i < 10; i++)

{

//xfa.resolveNode("Table1.Row1[" + i + "].Cell1").rawValue = i"; // Still not working

Table1._Row1.addInstance(1);

//form1.Table2.resolveNode("Row1[" + i + "]").Text1.rawValue = "hello" + i; // Still not working

Table2._Row1.addInstance(1);

}

xfa.form.recalculate(1);

Let me know if you have some other ideas.

Again thank you for your input...

Paul

Avatar

Level 10

Did you check the checkbox "Repeat Row for each data Item" in the Properties of Row1? and set the minOccurences to 1.

If you have done this already and still getting the errors, may be I have to look at the form to provide you an answer..

You can post your form to LiveCycle9@gmail.com so I can have a look at it.

Thanks

Srini

Avatar

Level 2

Srini,

I got it to work by using this:

xfa.resolveNode("Table1.Row1["

+ i + "].Cell1").rawValue = "some value";

thanks so much for you help.

Paul