on 10-20-2005 10:35 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Florian,
I'm not sure whether I understand you correctly. I'm working with a Checkboxgroup, there I only can bind the Text for the different checkboxes, but not if if they are checked.
When I want to find out if a checkbox is checked I do it the following:
for (int i = 0; i < wdContext.nodeIt_Sales_Org().size(); ++i) {
if (wdContext.nodeIt_Sales_Org().isMultiSelected(i)) {
// do something
}
}
Now, I want to do it the other way round, I want to set some checkboxes to 'checked'.
My problem with your answer is, of course I can create a 'Checked'-Element in my node, but there is no Checked-Property in a Checkboxgroup, so how should the Checkboxgroup know that I want to use this Checked-Element to define if a checkbox is checked or not?
Kind regards,
Timo
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.