conditional css not working on detail grid

Questionsconditional css not working on detail grid
Harry asked 9 years ago

Hi

I have a conditional in master (which works)

$f = array();
$f["column"] = "refcount";
$f["op"] = ">";
$f["value"] = "2";
$f["cellcss"] = "'background-color':'#82FA58'";
$f_conditions[] = $f;

$grid->set_conditional_css($f_conditions);

and a conditional in detail, which doesn't

$f = array();
$f["column"] = "type";
$f["op"] = "cn";
$f["value"] = "meta";
$f["cellcss"] = "'background-color':'#82FA58'";
$f_conditions[] = $f;

$grid->set_conditional_css($f_conditions);

Does conditional CSS not work in detail? Is there a fix?

Thank you

2 Answers
Abu Ghufran answered 9 years ago

It should work in both grids.
However make sure variables are reset in second grid, if same names are used.

Refer: demos/master-detail/master-multi-detail.php for working demo.

Harry answered 9 years ago

Works, thank you.

For clarification:

Master

$f = array();
$f["column"] = "refcount";
$f["op"] = ">";
$f["value"] = "2";
$f["cellcss"] = "'background-color':'#82FA58'";
$f_conditions[] = $f;

$grid->set_conditional_css($f_conditions);

Detail

$f_conditions = array(); <<<<<<
$f = array();
$f["column"] = "type";
$f["op"] = "cn";
$f["value"] = "meta";
$f["cellcss"] = "'background-color':'#82FA58'";
$f_conditions[] = $f;

$grid->set_conditional_css($f_conditions);

Your Answer

16 + 6 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?