Skip to content

Instantly share code, notes, and snippets.

@stevedev
Created October 22, 2013 18:41
Show Gist options
  • Save stevedev/7105844 to your computer and use it in GitHub Desktop.
Save stevedev/7105844 to your computer and use it in GitHub Desktop.
<?php
// Interface Option 1:
$this->addRowClass( 'active', function($row) {
if ($row->status == 'active') {
return true;
} else {
return false;
}
} );
// Interface Option 2:
$this->addRowAttribute( 'class', function($row) {
return $row->status;
});
@stevedev
Copy link
Author

You could also do this for working on a row with javascript:

$this->addRowAttribute( 'data-id', function($row) {
return $row->id;
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment