Welcome Guest, Not a member yet? Register   Sign In
Add class to row with HTML Table Class


 I see in the documentation that you can add class to cell items like this:

$cell = ['data' => 'Blue', 'class' => 'highlight', 'colspan' => 2];

$table->addRow($cell, 'Red', 'Green');

But can you add class to entire row? or is not possible?

Something like this:

$row = ['data' => [123,567,789], 'class' => 'row-class'];


If you look in the User Guide on the Table it has a Template that you configure for everything.

I use it to make bootstrap tables, I load it in the __constructor to make it available to all.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

The template applys to all elements. I want some rows to have specific class, not all.

For example, having all row background color red, green or gray defined by status, etc.

Theme © iAndrew 2016 - Forum software by © MyBB