Is conditional css on a row compatible with a master-detail grid set up?

QuestionsIs conditional css on a row compatible with a master-detail grid set up?
Gary Wilson asked 1 month ago

Hi,

Great product by the way. Moved from Platinum Grid this week and I am so much more productive.

In my php code, I have 2 grids: master and detail. In the master, I have conditional css formatting that turns rows yellow if a column is > 0 in value. Both work fine but not together. As soon as I switch on the detail_grid_id and subgridparams options from the master, the row colouring stops but the master detail grids work as expected. When I comment out these options, the row colouration springs back to life.

The above is an absolute must-have for me.

============================= Code Extract

$opt_stock[“detail_grid_id”] = “comp”;
$opt_stock[“subgridparams”] = “car_id,car_trim,car_model,car_transmission,car_fuel_type,car_shape”;
$stock->set_options($opt_stock);

…….

$f = array();
$f[“column”] = “car_red_minus_green”; // exact column name, as defined above in set_columns or sql field name
$f[“op”] = “>”; // cn – contains, eq – equals
$f[“value”] = “0”;
$f[“class”] = “set-yell-row”; // css class name
$f_conditions[] = $f;

$stock->set_conditional_css($f_conditions);

…………… I followed your conditional format example and placed the style as below:

<body>
<style>
tr.set-yell-row
{
background: #ffff00;
}
background-image: none;
margin: 0px;

</style>

<script>

</script>

<div class=”rTable”>

<div class=”rTableRow”>

<div id=”tree_div” class=”rTableCell”>
<?php echo $stock_out; ?>
<br>
<?php echo $comp_out;
?>
</div>
<div id=”targ” class=”rTableCell”>

</div>
</div>

</div>

</body>

 

2 Answers
Abu Ghufran Staff answered 4 weeks ago

This issue is fixed in latest build and emailed to you.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Gary Wilson answered 3 weeks ago

Yes that works fine. Thanks for the great support Abu.

Your Answer

5 + 10 =

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?