Check documentation for the latest version of dhtmlxSuite setStyle DHTMLX Docs

setStyle

Sets the style for the specified cell(s).

Parameters

  • $cell - (string|array) the cell coordinate (e.g. 'B1') or an array of coordinates of several cells
  • $style - (array) the style to set

    Available members of the array:

    • bold - (0 or 1) defines whether the bold style should be applied to the cell;
    • italic - (0 or 1) defines whether the italic style should be applied to the cell;
    • color - (hex value without the leading # sign) the text color;
    • background - (hex value without the leading # sign) the background color;
    • align - (left, right, center, justify) the alignment in the cell;
    • validator - (none, email, number, positive, not_empty) defines a validator applied to the cell;
    • lock - (0 or 1) specifies whether the cell is locked or unlocked.

Example

$sh = new SpreadSheet($res, "1", $db_prefix);
$sh->setStyle("B1", array("bold" => 0));

See also: getStyle

Back to top