Conditional alternate rows in the detail grid

QuestionsConditional alternate rows in the detail grid
Massimo Gagliardi asked 10 years ago

Hello
I would like to have a "detailed grid" with another css different from the "master grid" but also with alternate rows.
Because in the my detailed grid I have a primary key based on a progressive id starting by 1 step 1 I tried with:

$f = array();
$f["column"] = "Pr";
$f["op"] = "=";
$f["value"] = "intval({Pr} / 2) * 2";
$f["class"] = "detail-row";
$f_conditions[] = $f;

but doesn't work
Someone has a suggestion for me?
Thanks in advance
Massimo Gagliardi

4 Answers
Abu Ghufran answered 10 years ago

For alternate rows set following in detail grid:

$grid["altRows"] = true;
$grid["altclass"] = "myAltRowClass";
$g->set_options($grid);

And in html define that css class:

<style>
.myAltRowClass { background-color: #DDDDDC; background-image: none; }
</style>

To apply different CSS (theme) on detail grid is not doable in this version.
If someone is desperate, i've not tested it but here it is:

1- download 2 jquery-ui themes with different css scope prefix.
http://jqueryui.com/download/

2- include both theme css files in master-detail grid page

3- add 1st css scope class to first grid id, and 2nd selector to second grid using jquery
e.g.
$('#gbox_list1').addClass('firstprefix');
$('#gbox_list2').addClass('secondprefix');

Massimo Gagliardi answered 10 years ago

I'm not desperate but I would to try but I don't understand "different css scope prefix"; what do you mean? Someone can you send me an example or another help?

Abu Ghufran answered 10 years ago

When you visit: http://jqueryui.com/download/
At bottom of page, near download it mentions what is css scope.

Details: http://tinyurl.com/maxq86a

Please use one communication channel.
Either email or forum.

Massimo Gagliardi answered 10 years ago

I understood
Thank you very match

Your Answer

10 + 20 =

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?