DHTMLX Docs & Samples Explorer

setTextColor(value)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxgrid.js

sets the text color for the cell

  • value- (string) the color value.
    Can be specified as:
    • Predefined/Cross-browser color name
    • Hexadecimal color
    • RGB color
mygrid.cells("row1",1).setTextColor('red');          // Predefined/Cross-browser color name
mygrid.cells("row1",3).setTextColor('#ff0000');      //Hexadecimal color
mygrid.cells("row1",2).setTextColor('rgb(255,0,0)'); //RGB color

See also: getTextColor