Skip to Content
author's profile photo Former Member
Former Member

RE:retrieving data from checkbox group

hi all,

I have taken a checkbox group in my layout by binding the value attribute to that checkbox Group and i have taken a node for that attribute.and i have taken the node cardinality to 0...n

i am able to get those check boxes at runtime but iam unable to read checkboxes which are checked.

so can any body help me how to read values from checkbox group..............

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 07:16 AM

    Hi Mahesh,

    Welcome to SDN,

    You can get the checked check boxes using:

    wdContext.node<YOUR NODE NAME>().isMultiSelected(int index) which will return true if the checkbox at index is selected. Node here is the node containing the attribute to which your checkbox is mapped.

    Although there is a same problem posted in the forum already.

    Hope this will solve your problem.

    thanks & regards,

    Manoj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 07:25 AM

    Hi,

    If your node Name is test the following is the code

    for (int x=0; x< wdContext.nodeTest().size(); x++)

    {

    if( wdContext.nodeTest().isMultiSelected(x) )

    //Do what you want to do here

    }

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.