on 02-03-2010 12:55 PM
Hi.
For a table ,to get the lead selection for a selected row, I used to get it by
int ls=wdContext.nodeABC().getLeadselection()
so based on the ls value i get the current element and perfom my logic.
I have set the property for the ui element table "Selection Mode"=Multi.
How do I do the same in case more than 1 row is selected (multi row selection)?
How to get the reference for the element in this case?
Regards
Bala
Read the Javadoc for IWDNode:
/**
* Returns whether the element at the given index is selected. Does not look
* at the lead selection.
*
* @param index the index of the element
* @return true if the element is selected.
*/
boolean isMultiSelected(int index);
In release 7.20 there exists a new API.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin.
Thanks for your reply.
As per your reply, isMultiselected method will give you if the element at the given index is selected or not.
But my requirement is I need to delete the rows from the table based on the rows selected. If a single row is selected, then I can do it using lead selection and get the reference for the element and remove the element using
removeElement(IWDNodeElement element)
How can I achieve(deleting the rows from the table) if multiple rows are selected?
Thanks
Bala
Hi Armin,
Im curious, and you would be able to answer.. can you tell me a good reason why removeElement does not accept and int? - The underlying implementation does exactly that (and it checks for element.node() but this is completely irrelevant) - I know that you were not one of the designers of WDP but I guess you might know a couple.. 😛
Cheers,
Daniel
Releases >= 7.1 have:
Armin
Yes, Armin is correct.
Take first lead selection and put on the other(XYZ) node element, then check for another lead selection and put on the other(XYZ) node element and so no.
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
For finding multiple lead selection(or multi row selected), we need to iterate through node to find 1st lead selection and again n again we need to iterate through node for finding next selected row - correct
For selected rows, we need to store somewhere for further processing.
Hope that is fine now
Thanks
Arun Jaiswal
It works for a normal node, but need to know how recursive node works
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.