title: JqxGrid: Change color of row based on value of column
body: <p>I referred few answer from this forum
  <a href="http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-cellsrendering.htm" rel="nofollow">http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-cellsrendering.htm</a>
  <a href="http://www.jqwidgets.com/community/topic/change-row-color-of-gridview/" rel="nofollow">http://www.jqwidgets.com/community/topic/change-row-color-of-gridview/</a></p>
  
  <p>Both are done using the cellrendered event of a cell and it can be applied to same cell. How do I get the value of one cell to change the colour of a different cell?</p>
  
  <p>Or is there a method to change the background colour of the entire row? Below is the code I'm using to change the colour of same cell. </p>
  
  <pre><code>var cellsrenderer = function(row, column, value, defaultHtml) {
                  var element = $(defaultHtml);
                  element.css({ 'background-color': '#' + value });
                  return element[0].outerHTML;
              return defaultHtml;
  
  $("#jqxgrid").jqxGrid({
              width: 1100,
              autorowheight: true,
              autoheight: true,
              source: dataAdapter,
              theme: 'classic',
              columns: [
              { text: 'Job Number', dataField: 'jobNum' },
              { text: 'Project Name', dataField: 'ProjName' },
              { text: 'Hours', dataField: 'hrssum' },
              { text: 'Project Type', dataField: 'Suffix' },
              { text: 'color name', dataField: 'colorname', cellsrenderer: cellsrenderer }
              ]
          });
          }
  </code></pre>