This is just a quick post as it took no time at all to add a checkbox column to the grid using APEX features rather than an Ext plugin. Just goes to show that you can mix and match the functionality available from both products which highlights the flexibility of this approach…
Simply add the checkbox to your report query using the following:
SELECT htmldb_item.checkbox(1, geoname_id) rowSelector , .... FROM .... WHERE .....
Note: the id of 1 used above will create the checkbox with the name “f01″
Then for your column header use the following to toggle the column on/off. Note: ensure the names you use are unique on the page and are valid parameters of the “f” procedure, i.e. (we used “f10″ for the check all input parameter)
<input type="checkbox" name="f10" value="" onclick="toggleAll('f01')"><span>All</span>
And then reference the following javascript in your header
function toggleAll(id) {
Ext.select("input[name="+id+"]").each(function(el)
{
el.dom.checked ? el.dom.checked = false : el.dom.checked = true;
}
);
}
The end result is a checkbox column added to your report with a (de)select all option.

Comments are closed.
