![]() |
Codeigniter HTML Table Class, adding custom cell - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Codeigniter HTML Table Class, adding custom cell (/showthread.php?tid=39167) |
Codeigniter HTML Table Class, adding custom cell - El Forum - 03-03-2011 [eluser]Ficoder[/eluser] Hi, Here is the example code what i used: application/controllers/site.php Code: <?php application\views\site_view.php Code: <!DOCTYPE html> This works great! But... I wan't to add two custom cells to every row, so i can Delete or Modify every row from link. And of course every link has to contain SQL entry unique ID. But is it possible to add custom cells in this situation, or is my only way to throw "HTML Table class" to trash bin and write all "manually"? Codeigniter HTML Table Class, adding custom cell - El Forum - 03-03-2011 [eluser]zackhovatter[/eluser] http://ellislab.com/codeigniter/user-guide/libraries/table.html Check out 'make_columns'. That won't let you put the unique ID in though. Codeigniter HTML Table Class, adding custom cell - El Forum - 03-03-2011 [eluser]InsiteFX[/eluser] It is best to create a MY_Controller to do the following! Credit to Adam Griffiths Fresh CMS, which is no longer avaiable on his web site. Table Template placed into a MY_Controller Code: /** A Page Controller, To add Delete or Modify every row from link. Code: // ------------------------------------------------------------------------ Code should give you an idea of how it is done. InsiteFX Codeigniter HTML Table Class, adding custom cell - El Forum - 03-03-2011 [eluser]ericrjones1[/eluser] I always like to set my own header and rows with the Table library. Code: $this->table->set_heading('Column 1', 'Column 2', 'Column 3', 'Column 4;'); This usually allows me to create the table that I want. This usually allows me to create the table exactly how I want it to be. Codeigniter HTML Table Class, adding custom cell - El Forum - 03-03-2011 [eluser]InsiteFX[/eluser] If you read the code you would see that it is setting the heading! InsiteFX Codeigniter HTML Table Class, adding custom cell - El Forum - 03-03-2011 [eluser]ericrjones1[/eluser] Your right. My mistake. |