PDA

View Full Version : "Check" event for checkbox



env0ke
11 Dec 2011, 4:40 AM
Hello,

In docs i find event "change" for checkbox and it worked. But i need event for check/uncheck. Not found it in docs.

skirtle
11 Dec 2011, 4:56 AM
What would it do that change doesn't do?

env0ke
11 Dec 2011, 5:00 AM
skirtle, for example:

i have a grid with toolbar
in toolbar i have checkbox
checkbox - it's a filter for data in grid
Events:

If checkbox checked - data filtered in grid
If checkbox is unchecked - data is not filtered
Default state for checkbox - unchecked (data not filtered).

skirtle
11 Dec 2011, 5:05 AM
Why is it not just this?


change: function(checkbox, value) {
if (value) {
doFiltering()
}
else {
clearFiltering();
}
}

env0ke
11 Dec 2011, 5:09 AM
really, worked.