CodeIgniter Forums
Set ID on HTML Table Rows - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Set ID on HTML Table Rows (/thread-1856.html)



Set ID on HTML Table Rows - El Forum - 07-01-2007

[eluser]Unknown[/eluser]
Hi all,

I need do define a unique ID on every single html table row.

I'm using add_row method to set the cells data.

I tried the template option too, but i cant figure any way of set unique info on each table row <TR> using Table Class.

Can anyone help me ?

Thanks in advance.

PV


Set ID on HTML Table Rows - El Forum - 07-01-2007

[eluser]xwero[/eluser]
i think the easiest way to do it is to have a foreach loop in your view file. The table class as it is uses three lines of code at least, a foreach loop has three lines too and it's more flexible.


Set ID on HTML Table Rows - El Forum - 07-01-2007

[eluser]Unknown[/eluser]
Hi,

Thanks for your response.

I think i need to have diferent strategies for diferent kind of tables. Right?

The HTML table class has some limitatios.

Thanks

Pedro


Set ID on HTML Table Rows - El Forum - 07-01-2007

[eluser]xwero[/eluser]
The table class is very basic. I put out some ideas how to configure a more useful table class in another thread and i'm willing to build this library but i have so little time and i'm working on another library right now. Maybe i pick it up after the first library is finished.