adding class to html table row |
[eluser]intsurfer[/eluser]
Hi! I've changed the Table.php library to set class for rows. I googled how to do it, but i decided to make some changes in the library file. This is code from my project: Code: foreach($res as $item){ Code: <tbody>
[eluser]InsiteFX[/eluser]
Why, you can create your own Table Template add the class right there. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]rip_pit[/eluser]
i think the template will only permit to set odd and even classes but not to specify different custom classes for any row. if i remember I met the case few weeks ago and had to stop using table helper (no time to develop my own lib) anyhow it could be a good lib, try publish it in the lib directory in the wiki https://github.com/EllisLab/CodeIgniter/wiki/
[eluser]intsurfer[/eluser]
[quote author="InsiteFX" date="1342039620"]Why, you can create your own Table Template add the class right there. [code] 'heading_row_start' => '<tr>', 'row_alt_start' => '<tr class="alt">', [/quote] cause i can have 10-10000 with different classes. I use those classes for filtering with JQuery. Third record - <tr class="6_5">, the next - <tr class="16_1">, etc.
[eluser]intsurfer[/eluser]
[quote author="rip_pit" date="1342044725"]i think the template will only permit to set odd and even classes but not to specify different custom classes for any row. if i remember I met the case few weeks ago and had to stop using table helper (no time to develop my own lib) anyhow it could be a good lib, try publish it in the lib directory in the wiki https://github.com/EllisLab/CodeIgniter/wiki/[/quote] Thanks for the link! |
Welcome Guest, Not a member yet? Register Sign In |