cancel
Showing results for 
Search instead for 
Did you mean: 

How to select checkbox values from checkbox group element

Former Member
0 Kudos

Hi All,

I have total 40 number of checkbox and i used checkboxgroup element. Depending upon the user 's selection(select/de-select),I have to retain the state of the checkbox.

I want to get which perticular checkbox the user has modified and to which state(true/false)

Thanks

Kiran

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Thanks a lot all

Former Member
0 Kudos

Hi All,

Thanks for your replies.

I got solved this problem by execuing follow code:-

if(wdContext.node<Node_Name>().isMultiSelected(i))

{

wdComponentAPI.getMessageManager().reportSuccess("selected "+

wdContext.node<Node_Name>().get<Node_Name>ElementAt(i).getAttributeValue(<Attribute_Value>));

}

Former Member
0 Kudos

Hi Surender,

Thanks a lot for quick reply with solution.

i have modified it with this :-

"wdContext.node<Node_Name>().get<Node_Name>ElementAt(i).getAttributeValue(Attribute_Name));"

it's working but it always showing first checkbox value with selected one.

Thanks and Regards

Kiran

Former Member
0 Kudos

Hi,

If a checkbox is toggled, the event onToggle is triggered. Event parameter checked contains the new state of the checkbox, property index contains the index of the toggled checkbox

Regards

Ayyapparaj

Former Member
0 Kudos

Hi,

U can use below code for getting selected check box.


for(int i=0;i<wdContext.node<node name>().size();i++)
{

if(wdContext.node<node name>().().isSelected(i))
{
wdThis.wdGetAPI().getComponent().getMessageManager().reportSuccess(""+wdContext.node<node name>().().get<node name>().().ElementAt(i).get<attribute name>());
}
}

put this code in action or wdModifyView()

Regards,

Surender Dahiya