The description is simple: I have three checkboxes and the third one must select all the others when selected (and deselect them as well, once it's unchecked). All this must be in a grid, I can't use html or any other language but Google Apps Script.

This is probably a simple task for you, but I'm struggling a lot, both with javascript and english. Anyway here's the code:

```js
function checkboxes() {
  var range = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = range.getSheetId();
  var myapp = UiApp.createApplication().setTitle('Title').setWidth(1000).setHeight(100);
  var mygrid = myapp.createGrid(3, 3).setCellPadding(5).setCellSpacing(5);

  //One
  mygrid.setWidget(0, 0, myapp.createLabel('One').setId('One'));
  mygrid.setWidget(0, 1, myapp.createCheckBox().setName('One'));

  //Two
  mygrid.setWidget(1, 0, myapp.createLabel('Two').setId('Two'));
  mygrid.setWidget(1, 1, myapp.createCheckBox().setName('Two'));

  var handler1 = myapp.createClientHandler().forTargets(myapp.getElementById('One')).setValue(true).forTargets(myapp.getElementById('Two')).setValue(true);

  //Last
  mygrid.setWidget(2, 0, myapp.createLabel('Last').setId('Last'));
  mygrid.setWidget(2, 1, myapp.createCheckBox().setName('Last').OnClickHandler(handler1));
  //...
}

```