Share Pastebin
Guest
Public paste!

Ragi Burhum

By: a guest | Feb 9th, 2010 | Syntax: JavaScript | Size: 0.85 KB | Hits: 32 | Expires: Never
Copy text to clipboard
  1. {header: "Color", sortable: false, dataIndex: 'colorhex',
  2.                         renderer: function(value, metaData, record, rowIndex, colIndex, store) {
  3.                                               //if (value == 'whatever') {
  4.                                                   //metaData.css : String : A CSS class name to add to the TD element of the cell.
  5.                                                   //metaData.attr : String : An html attribute definition string to apply to
  6.                                                   //                         the data container element within the table
  7.                                                   //                         cell (e.g. 'style="color:red;"').
  8.                                                   //metaData.css = 'name-of-css-class-you-will-define';
  9.                                               //}
  10.                                                  
  11.                                                   var newStyle = 'style="color:' + value + ';"';
  12.                                                   metaData.attr = newStyle;//'style="color:red;"';
  13.                                               return "&#x25A0";//value;
  14.                                            }
  15.                
  16.                
  17.                 },
  18.                 {header: "Name", width: 200, sortable: true, dataIndex: 'name'},