on 06-18-2010 7:44 AM
Hi
I am using a recursive node to populate a table with TreeByNestingTableColumn as master column. Now my problem is how do I identify if the current selected row in the table is a child or parent? When I get the lead selection value, I find that its the same for the parent and the child. I am setting the isLeaf and hasChildren boolean properties appropriately as false and true for parent and true and false for child. But since the lead selection is returning the same the below rsTableElement always gives me the parent, I always get those parameter values as that of parent. I am writing this inside the onleadSelect event of the table.
IRsTableElement rsTableElement = (IRsTableElement) wdContext.nodeRsTable().getElementAt(wdContext.nodeRsTable().getLeadSelection());
In this scenario how do I know if the current selection is made on a child?
Appreciate for all help and any code snippets.
Thanks,
KN.
Hi KN,
I guess you want to check if the node that you selected is parent or child.. This can be achieved by using getTreeSelection() method of IWDNode.
If you write following code in your lead selection action, you can determine the if it is a parent or child node.
wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeRsTable().getTreeSelection() +"");
the output will be something like
<ViewName>.RsTable.0.ChildRsTable.1.ChildRsTable.0.. depending upon which node you have selected.
That way you can find out if it is a parent or child node.
Abhinav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.