Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Lock a particular cell on every row of a table

Avatar

Level 2

I have a single Table ("TableA") with 4 rows - all named "Row". Thus...Row[0], Row[1], Row[2], and Row[3].


Each row has 3 cells.

What I'm trying to do is lock the 2nd cell ("Cell2") on every row - essentially locking an entire column.

I tried using the following script on a button, but it doesn't work.

TableA.Row[*].Cell2.access = "protected";

Any ideas?

Thanks in advance!

Tony

1 Accepted Solution

Avatar

Correct answer by
Level 2

I figured it out using a loop statement...

Will leave this posted just in case it helps someone else in the future!

var rows = xfa.resolveNodes("TableA.Row[*].Cell2");

    for (var i = 0; i < rows.length; i++)

    {

                var lockField = rows.item(i);

        lockField.access = "protected";

    }

View solution in original post

0 Replies

Avatar

Correct answer by
Level 2

I figured it out using a loop statement...

Will leave this posted just in case it helps someone else in the future!

var rows = xfa.resolveNodes("TableA.Row[*].Cell2");

    for (var i = 0; i < rows.length; i++)

    {

                var lockField = rows.item(i);

        lockField.access = "protected";

    }