Hi,
I use this …
$f = array();
$f["column"] = "glf_note";
$f["op"] = "cn";
$f["value"] = "guy";
$f["css"] = "'background-color':'#8BE5E6'";
$f_conditions[] = $f;
$grid->set_conditional_css($f_conditions);
… it works fine. Now I would like to highlight a line when glf_note is not empty. What can I use as "op" and "value" ?
I tried "op" = "<>" … "!=" … it doesn't work …
Thanks.
To have not empty formatting, use:
$f = array();
$f["column"] = "glf_note";
$f["op"] = "!=";
$f["value"] = "''"; // value is ' ' (non spaced)
$f["css"] = "'background-color':'#8BE5E6'";
$f_conditions[] = $f;
I copy/pasted this … it doesn't work. It has highlighted all lines.
Do I miss something ?
Thanks,
Hello,
I rechecked and verified it again. if name has blank value, this would highlight the row.
$f = array();
$f["column"] = "name";
$f["op"] = "=";
$f["value"] = "";
$f["css"] = "'background-color':'red'"; // this also work
$f_conditions[] = $f;
ooops … I accidently rated to -1 … sorry … 🙁
Your last suggestion works fine but the problem is I need to test the exception. The field is most of time empty that's why I need to highlight it in case of some users commented it (if it is not empty) ..
Is it possible to test it in $e["on_data_display"] ??
If not, no matter, I will put a default value in it to solve this.
Thanks,