Codeigniter HTML Table Class, adding custom cell |
[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"?
[eluser]zackhovatter[/eluser]
http://ellislab.com/codeigniter/user-gui...table.html Check out 'make_columns'. That won't let you put the unique ID in though.
[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
[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.
[eluser]InsiteFX[/eluser]
If you read the code you would see that it is setting the heading! InsiteFX
|
Welcome Guest, Not a member yet? Register Sign In |