CodeIgniter Forums
Table Library: Need Help for proper solution => How to add CSS for each column - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: Table Library: Need Help for proper solution => How to add CSS for each column (/thread-30193.html)



Table Library: Need Help for proper solution => How to add CSS for each column - El Forum - 05-06-2010

[eluser]huzzel[/eluser]
Hi,

i need to set a column to 100% so i changed the core library.

Code:
foreach($this->heading as $heading)
            {
                $out .= $this->template['heading_cell_start'];
                $out .= $heading;
                $out .= $this->template['heading_cell_end'];
            }

Code:
foreach($this->heading as $key => $heading)
            {
                $out .= '<th id="th_' . $key . '">';
                $out .= $heading;
                $out .= $this->template['heading_cell_end'];
            }

How can i use this modification without changeing the corelibrary ?


Table Library: Need Help for proper solution => How to add CSS for each column - El Forum - 05-08-2010

[eluser]huzzel[/eluser]
**push**

no solution available ?


Table Library: Need Help for proper solution => How to add CSS for each column - El Forum - 05-08-2010

[eluser]Jamie Rumbelow[/eluser]
Hi huzzel,

It's easy to change core library methods; just create a file called MY_Table.php in your application/libraries folder. You can then create your own MY_Table class and overwrite any methods you like. Find more information in the User Guide (scroll down to the "Replacing Native Libraries with Your Versions" section.)

Hope this helps,

Jamie


Table Library: Need Help for proper solution => How to add CSS for each column - El Forum - 05-08-2010

[eluser]huzzel[/eluser]
Thanks for your reply. i thought i can do this without replacing the full function.