altrows on master detail page

Questionsaltrows on master detail page
Gary Brett asked 10 years ago

Hi Abu, is it possible to use alternate rows on the master detail grids? I have added the code to your demo master-detail.php but the page doesn't load when code below is added?

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

I have it working on all my other grids so wondered if its not possible with this type. No worries if not.

Cherers

Gary

3 Answers
Gary Brett answered 10 years ago

Sorry forgot the code! http://pastebin.com/MgUx2e9L lines 180 & 217

Abu Ghufran answered 10 years ago

Wrong var names.

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

should be

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

Gary Brett answered 10 years ago

Thanks Abu, that fixed it but odd as I have it as $grid in my other pages that works!

Cheers

Gary

Your Answer

9 + 5 =

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?