cancel
Showing results for 
Search instead for 
Did you mean: 

firstVisibleRow problem

Former Member
0 Kudos

Hello

I want to display a table EXCEPT the first row...

I naturally set the firstVisibleRow to 2 (then I tried 1, or 5) but it doesn't work...

help please

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i don't understand

i want all the elements

but not the first row of the table

Former Member
0 Kudos

Each row in your table corresponds with an element in your context node.

So if you don't want a particular row in your table you must delete that element from the context node.

In order to delete the first element (which is the first row in your table) you can do:


wdContext.nodeSomeName.removeElement(wdContext.nodeSomeName.getLeadSelection(0));

Make sure the element exists though.

If your table data is a model node, you may want to copy the data to a value node and bind this value node to your table.

Good luck,

Roelof

Former Member
0 Kudos

Hello Philippe,

You can use the following code to remove rows of a table you don't want

int leadSelect = wdContext.node<node name>.getLeadSelection();

IPrivate<view name>.I<node name>Element myElement = (IPrivate<view name>.I<node name>Element) wdContext.node<node name>.get<node name>ElementAt(leadSelect);

wdContext.node<node name>.removeElement(myElement);

Let me know if it helps..

Answers (2)

Answers (2)

Former Member
0 Kudos

i don't have to do that anymore but it may be very helpful, thanks !

Former Member
0 Kudos

Hi,

This method only moves a pointer to the particular row, it will allways be possible to navigate to the rows above.

Instead you must delete the context elements of your context node that is bound to the table, for each element you don't want to appear in yoyr table.

e.g. wdContext.nodeSomeName.removeElement

(or make sure the context node was not filled with these elements in the first place)

Good luck,

Roelof