cancel
Showing results for 
Search instead for 
Did you mean: 

How to display a table without selecting the first row as default ?

Former Member
0 Kudos

Hello All,

Can someone advise on how I am able to display a table but with no row selected on initial display ? Currently, the table is being displayed with the first entry selected by default (The orange box is selected). Thank you very much.

from

Kwok Wei

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Bharat,

ClearSelection will clears the Node's multiple selection and does not change the lead selection.

I don't think it will work if you change the selection also !!!

Regards, Anilkumar

Former Member
0 Kudos

Hi Anil,

I remember going through this particular class which has these functions.

It said clear selection sets the value to -1. It should be available in the help docs also .

And that node selection property applies for both clear selection and set as -1 ..(as they both are similar .. and the node selection is the one which decides the selection possibility and not the table ...)

Regards

Bharathwaj

Former Member
0 Kudos

Javadoc for IWDNode says:

public void clearSelection()

Clears the Node's multiple selection; does not change the lead selection.

public void setLeadSelection(int index)

Sets the lead selection to the given index. It may be called with NO_SELECTION to reset (clear) the lead selection.

Parameters:

index - the index of the element

Throws:

ContextException - if caller tries to reset the selection, but selection is mandatory

IndexOutOfBoundsException - if the given index is not within the element list

See Also:

getLeadSelection()

Armin

Former Member
0 Kudos

Hi,

Thanks again Armin ! Just checked .. I think it was some other class...:(

Sorry Anil !

And Armin how about the node property ! Can its selection property be 1..n

Regards

Bharathwaj

Former Member
0 Kudos

If the table selection mode is set to "automatic", the context node selection determines the table selection.

To get an unselected table, you need context node selection cardinality <b>0</b>:N.

To avoid initializing the lead selection of the context node, set the property "initializeLeadSelection" to false (in the context editor).

Armin

Former Member
0 Kudos

Thank you ALL very much for the suggestion.

Former Member
0 Kudos

Hi,

Change the table "SelectionMode" property to "None" and try !!

Another way is

1. Set the "SelectionMode" to Auto

2. In the init set the leadSelection to -1

Ex :wdContext.Node<<NodeName>>.setLeadSelection(-1);

Regards, Anilkumar

Message was edited by: Anilkumar Vippagunta

Former Member
0 Kudos

Hi,

Use wdContext.node<<nodename>>.clearSelection();

I think setting to -1 is equivalent to this !

And doing this might not suffice when the node which is mapped to the table has a selection 1..n . In that case yuou have to change the selection property of the node to 0..n.

Regards

Bharathwaj