Skip to Content
avatar image
Former Member

Check a checkbox of a checkboxgroup programmatically

Hi!

How can I set a checkbox which is part of a checkboxgroup to 'Checked'?

I tried:

for (int i = 0; i < wdContext.nodeIt_Custom().size(); ++i) {

wdContext.nodeIt_Custom().isMultiSelected(i);

}

... but it doesn't work, unfortunately.

Would be great, if you could help me.

Thanks,

Timo

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Oct 20, 2005 at 09:44 AM

    Hi Timo,

    you need to bind the "checked"-Property of the Checkbox to a Context-Attribute of type boolean.

    Then you can check, whether the box is checked ( >true) or unchecked ( >false)

    for(int i=0; i<wdContext.nodeCheckboxes().size(); i++)
    {
    if (wdContext.nodeCheckboxes().getCheckBoxElementAt(i).getChecked())
    {
      //Do anything
    }
    }

    Hope this helps. Regards,

    Florian

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Armin,

      thanks a lot. It's again a good example of sitting in front the computer thinking about a solution but the possible easy solution don't come into my mind.

      Bye,

      Timo