Hi,
How can I format individual cell based on content in it?
I'm using:
$f = array();
$f["column"] = "deb";
$f["op"] = "eq";
$f["value"] = "0.00";
$f["css"] = "'color':'#FF0000'";
$f_conditions[] = $f;
$g – set_conditional_css($f_conditions);
But full row is red (font-color) and not only cell's content equal to "0.00".
Thank you!
Use cellcss OR cellclass properties for cell only formatting.
// highlight cell, if defined cellclass OR cellcss
$f = array();
$f["column"] = "id";
$f["op"] = "=";
$f["value"] = "12";
// $f["cellcss"] = "'background-color':'red'"; // this also work
$f["cellclass"] = "focus-cell";
$f_conditions[] = $f
Hi Sir,
Your example didn't work to me (the cell didn't change the color).
Thank you!
I updated jqgrid_dist.php to "version 1.5.0 build 167-20130830" but the code below didn't work:
// highlight cell, if defined cellclass OR cellcss
$f = array();
$f["column"] = "id";
$f["op"] = "=";
$f["value"] = "12";
// $f["cellcss"] = "'background-color':'red'"; // this also work
$f["cellclass"] = "focus-cell";
$f_conditions[] = $f
Thank you!