on 05-25-2008 9:06 AM
Hi,
Our senerio is as follows:
We need to capture the single selection in the table.
There are three options:
1. No element in the Table(no selection).
2. single selection(one row selected).
3. multiple selection(more than one row selected).
How can we code to differentiate all these??
regards
Anumit
Hello,
Try like this..
Hi,
Try this:
int leadSelection = wdContext.nodeZemp_Details().getLeadSelection();
if(leadSelection == -1 )
{
// No Selection
}else{
for(int i=0;i<wdContext.node<nodeName()>.size();i++)
{
if( leadSelection == i || wdContext.node<nodeName()>.isMultiSelected( i ) {
// Multiple Processing.
}
}else{
// Single Selection
}
Thanks n Regards,
Jhansi Miryala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not possible to react on multi-selection changes because there is no action available. But you can handle changes of the lead-selection by assigning an action to the onLeadSelect event. To change button states, you can use a combination of assigning an empty action and using calculated attributes for controlling the button's "enabled" property.
Armin
Hi,
Try this:
int leadSelection = wdContext.nodeZemp_Details().getLeadSelection();
for(int i=0;i<wdContext.node<nodeName()>.size();i++)
{
if( leadSelection == i || wdContext.node<nodeName()>.isMultiSelected( i ) {
// Processing.
}
}
Thanks n Regards,
Jhansi Miryala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I guess you need some thing as follows
WDTableSelectionMode mode ; //An attribute which is buund to the table selection mode property
if( mode.equals(WDTableSelectionMode.MULTI))
{
//Do respective
}
else if( mode.equals(WDTableSelectionMode.SINGLE))
{
//Do respective
}
else
{
//Do respective
}
Regards
Ayyapparaj
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.