cancel
Showing results for 
Search instead for 
Did you mean: 

how to get the unchecked items from a checkbox group.

Former Member
0 Kudos

Hello,

I am using a checkbox group UI element. I have to get the unchecked members of the checkbox group. How should I go about this.

Thanks a lot

Srinivas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Say your checkbox group is bound against "Items" (context node containing the attribute to which "texts" property is bound).

Then


for (int i = 0; i < wdContext.nodeItems().size(); ++i)
{
  if ( wdContext.nodeItems().isMultiSelected(i) )
    /* item at index i is checked */
  else
    /* item at index i is unchecked */
}

gives you the checked/unchecked items.

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sri,

Its simple. Just as you get the checked items similar to that you can get the unchecked items as explained below:


for(int i=0; i<wdContext.<nodename>.size();i++){
if(condition for checking the item is checked){
     //here put the code for checked item
    }
else{
      //here put the code for unchecked item
      }
}

Regards.

Rajat