Check/uncheck all for check boxes

is there a way we can Check/uncheck all for check boxes…? i tried this using a custom list and a dataprovide.

I don’t really understand the background of the question. You can loop through the dataproviders or the elements and set the values…

We are kids of servoy…

what we needed is by clicking the button the values in the checkboxlist is checked.(in the design structure the checkbox values are inside the valuelist).In this circumstance which method will suite?

I still don’t understand the issue completely. Not enough info, for instance are your checkboxes attached to one dataprovider or more?

BTW instead of thinking about the checkbox as a seperated object from the data you should bare in mind that whatever you do, whenever you do it, on the dataprovider will influence the gui as well. So, when you change the dataprovider value from 0 to 1 you will have a checked checkbox.

Does that answer your question?

Here is what we done & need
what we done is by selecting a checkbox and insert 15 values through custom values in value list and place a button.Now we can able to check each values in checkbox.
What we really need is by clicking the button all the values in the checkbox must be checked (or) clicked at a time,Exactly the form looked like all the 15 checkbox(15 values) is checked .For this we need u r help.

Hi,

I am really really sorry but I have a very hard time reading your post.

selecting a checkbox and insert 15 values through custom values in value list and place a button.

You are talking about one dataprovider, 15 values and a button to check/uncheck them?

If so you can fill the dataprovider with the 15 values of the valuelist, separated with ‘\n’ to check or remove them all to uncheck. Is that what you want?

Great, the first thing is absolutly correct.But in a single dataprovider how we can insert more than one value.The values getting for the checkbox is through valuelist. When we are clicking the dataprovider in the property we can able to select only one from the property editor.In that how we enter the \n and the next value.And whats the method we need to use when clicking the button for display all the checkbox checked.Can u plz give me a solution.

rifluxyss:
Great, the first thing is absolutly correct.But in a single dataprovider how we can insert more than one value.The values getting for the checkbox is through valuelist. When we are clicking the dataprovider in the property we can able to select only one from the property editor.In that how we enter the \n and the next value.And whats the method we need to use when clicking the button for display all the checkbox checked.Can u plz give me a solution.

Something like this should do the job:

var dataset = application.getValueListItems('my_valueList');

for ( var i = 1 ; i <= dataset.getMaxRowIndex() ; i++ )
{
	my_Field += '\n' + dataset.getValue(i,1)

}

controller.saveData()

Remember to clean any leading ‘\n’ in the field, take a look at the Utils node in the editor.

Something like this should do the job

thanks nick, saves me some time :)

Thanks to Nicky & Marchel

We had successfully completed our task.Thanks both for ur timely response. In future we expect the same.