Skip to Content

Usage of CheckboxGroup


does anybody know if there's an example of how to use a CheckboxGroup? Unfortunately I couldn't find anything in the tutorials.

I'd like to know a nice way to

- set the names of the check boxes

- have all check boxes selected

- get information if the check boxes have been selected



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jul 06, 2004 at 06:12 PM

    Hi Christian,

    this is all about context binding and -programming.

    Let context value node A (cardinality 0..n) contain two value attributes "text" (string) and "enabled" (boolean), then the "texts" property of the CheckBoxGroup is bound to A.text, the "enabled" property of the CBG (another new three-letter acronym 😉) is bound to A.enabled.

    You add for example 3 elements to A and set the text and enabled-property of each element accordingly. As a result you'll get 3 checkboxes (no surprise really).

    If you want to have more than one checkbox selected, set the "selection" property of A to 0..n. Which checkbox(es) are selected can be checked by wdContext.nodeA().isMultiSelected(index).

    There's an example describing the data binding here:

    The CBG is created dynamically there, but anyway this should give you some more hints.

    Hope that helps.



    Add comment
    10|10000 characters needed characters exceeded