title: In a kendo grid, can I set column attributes dynamically with a function?
body: <p>I've got some code here where I am trying to set a background color of a cell based on the value of the data item: <a href="http://dojo.telerik.com/@solidus-flux/eHaMu" rel="noreferrer">http://dojo.telerik.com/@solidus-flux/eHaMu</a></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Kendo UI Snippet&lt;/title&gt;
  
      &lt;link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.common.min.css"&gt;
      &lt;link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.rtl.min.css"&gt;
      &lt;link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.default.min.css"&gt;
      &lt;link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.min.css"&gt;
      &lt;link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.dataviz.default.min.css"&gt;
      &lt;link rel="stylesheet" href="http://cdn.kendostatic.com/2014.3.1411/styles/kendo.mobile.all.min.css"&gt;
  
      &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
      &lt;script src="http://cdn.kendostatic.com/2014.3.1411/js/kendo.all.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;div id="grid"&gt;&lt;/div&gt;
  &lt;script&gt;
  $("#grid").kendoGrid({
    columns: [ {
      field: "name",
      title: "Name",
      attributes: function(e) {
        return {
          "class": "table-cell",
          style: e.name == "Jane Doe" ? "background-color: red" : "background-color: green"
        };
      }
      //attributes: {
        //"class": "table-cell",
        //style: "text-align: right; font-size: 14px"
      //}
    } ],
    dataSource: [ { name: "Jane Doe" }, { name: "John Doe" }]
  });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I realize I could do this with a template, but that would require an extra html element, since you can't change the markup of the td itself. I'd like to use a function to return attributes if that is supported.</p>