• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add class to row with HTML Table Class

#1
Hi,

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

Code:
$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:

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

$table->addRow($row);
Reply

#2
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 )
Reply

#3
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.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.