title: Dojo DGrid applying formatting to cell contents
body: <p>I have a dgrid and i am attempting to style cells by underlining the text in the cell when the checkbox(s) are selected for the row.</p>
  
  <p>My approach was to attach a css class to the item once the checkbox is checked for the row. However this does not work. Under is a fiddle and my code. </p>
  
  <p>How can i style a cell once a checkbox is checked for the row? <a href="http://jsfiddle.net/devdarin/22h5G/5/" rel="nofollow">JSFIDDLE style cells for selected row</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div id="grid" class="grid"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>require([
  
      "dijit/form/CheckBox",
      "dijit/form/Textarea",
      "dijit/form/FilteringSelect",
      "dijit/form/TextBox",
      "dijit/form/ValidationTextBox",
      "dijit/form/DateTextBox",
      "dijit/form/TimeTextBox",
      "dijit/form/Button",
      "dijit/form/RadioButton",
      "dijit/form/Form",
  
  ]);
  
  require([
      "dojox/validate/us",
      "dojox/validate/web",
      "dojox/layout/TableContainer",
      "dojox/layout/GridContainer",
      "dojox/widget/Wizard",
      "dojox/widget/WizardPane",
      "dojox/grid/_CheckBoxSelector"
  
  ]);
  
  require([
      "dojo/parser",
      "dojo/_base/declare",
      "dojo/store/Memory",
      "dgrid/OnDemandGrid",
      "dgrid/ColumnSet",
      "dgrid/Selection",
      "dgrid/selector",
      "dgrid/Keyboard",
      "dgrid/extensions/DijitRegistry",
      "dgrid/editor",
      "dgrid/extensions/ColumnHider",
  
  
      "dojo/domReady!"
  
  ], function (parser, declare, MemoryStore, OnDemandGrid, ColumnSet, Selection, selector, Keyboard, DijitRegistry, editor, ColumnHider) {
      parser.parse();
  
  
      var data = [{
          id: "1",
          idType: "Passport",
          idNumber: "12121545WWW"
      }, {
          id: "2",
          idType: "Drivers Permit",
          idNumber: "11212154515 FF"
      }, {
          id: "3",
          idType: "Electoral Identification",
          idNumber: "425123123121"
      }];
      var store = new MemoryStore({
          data: data
      });
  
  
      var CustomGrid = declare([OnDemandGrid, selector, Selection, Keyboard, editor, DijitRegistry]);
  
      var grid = new CustomGrid({
          store: store,
          columns: {
              col1: {
                  label: "Id",
                  field: "Id",
                  hidden: true
              },
  
              completed: selector({}),
  
              col3: {
                  label: "ID Type",
                  field: "idType",
                  formatter: function(item){
                  return "&lt;div" + (item.completed ? ' class="completed"' : "") +
                              "&gt;" + item + "&lt;/div&gt;";
                  }
              },
  
              col4: {
                  label: "ID Number",
                  field: "idNumber"
              }
  
          },
          SelectionMode: "none",
          allowSelectAll: true
      }, "grid");
  
  
  
  
      grid.renderArray(data);
  });
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>#grid .completed {
      text-decoration: line-through;
      font-style: italic;
  }
  </code></pre>