• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
checkbox column

#1
How do I make an extra column with checkboxes in a generated table?


Code:
$template = array(
        'table_open'            => '<table border="1" cellpadding="4" cellspacing="0">',

        'thead_open'            => '<thead>',
        'thead_close'           => '</thead>',

        'heading_row_start'     => '<tr>',
        'heading_row_end'       => '</tr>',
        'heading_cell_start'    => '<th>',
        'heading_cell_end'      => '</th>',

        'tbody_open'            => '<tbody>',
        'tbody_close'           => '</tbody>',

        'row_start'             => '<tr>',
        'row_end'               => '</tr>',
        'cell_start'            => '<td>',
        'cell_end'              => '</td>',

        'row_alt_start'         => '<tr>',
        'row_alt_end'           => '</tr>',
        'cell_alt_start'        => '<td>',
        'cell_alt_end'          => '</td>',

        'table_close'           => '</table>'
            );

        
           $this->table->set_template($template);
                return $this->table->generate($query);

Thanks in advance Smile
Reply

#2
Once the Table is built you cannot add to it with out using JavaScript.

You can see the CodeIgniter Users Guide's - HTML Table Library for info.

It has methods for adding headers, rows and columns.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(12-06-2017, 09:14 AM)InsiteFX Wrote: Once the Table is built you cannot add to it with out using JavaScript.

You can see the CodeIgniter Users Guide's - HTML Table Library for info.

It has methods for adding headers, rows and columns.

Oh I didn't know that.  Thanks!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.