cancel
Showing results for 
Search instead for 
Did you mean: 

SelectAll method generic for all tables in the view

Former Member
0 Kudos

Hi,

I have four tables in my view. I created methods for Select_All and Deselect_All for one table ABC using this code and it works fine.

int elements = wdContext.nodeABC().size();

for(int x=elements-1; x>=0 ; x--)

{

wdContext.nodeOrgunits().setSelected(x,true); //false for Deselect

}

My question is, Do I have to write four Select_All methods for four tables? or is there a way of re-using same method for all other tables ? Please advise.

Thanks,

Dileep

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

if you want to reuse the select all method for all the table so just add a parameter tableNode of type IWDNode in the method and wright the below code

int elements = tableNode.size();

for(int x=elements-1; x>=0 ; x--)

{

tableNode.setSelected(x,true); //false for Deselect

}

Call the method by passing all the table node one by one as a parameter.

Thanks & regards

Ravindra Singh

Former Member
0 Kudos

Thanks Ravindra,

SelectAll is an Action on click of a button. So, if I pass IWDNode parameter from Action, how does the actual node get passed. The Button itself is not tied to the node. I am getting null value on the IWDNode parameter of the node.

Please advise,

Thanks, Dileep