HOWTO: Dojo Grid, Checkbox Selection

In the next release of Memoratiā„¢, I am going to use the new Dojo Grid widget. One of the problems I had, is that the grid does selection the way desktop grids do:

  • Clicking the row selects it.
  • Clicking while holding the shift or ctrl key selects multiple rows.

This is fine! But it isn't what users of web applications expect. They are accustomed to selecting a row by clicking a checkbox in the left-most column, like in Gmail.

In this article, I describe how I got the Dojo Grid to use a checkbox for selection.

For simplicity sake, I am going to build off the example described in the Dojo Grids: Diving Deeper article by Bryan Forbes on the SitePen blog. Let's assume that your grid boiler plate looks like this:

var data = [
Syndicate content