combine 4 columns of the table header

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
eayvl
User
Posts: 315

combine 4 columns of the table header

Post by eayvl »

Hi, in Excel I can combine cells; in phpmaker I want to combine the header of the table, example:

in the demo project home.php "Out of stock products" to combine 3 columns (Category Name, Product Name y Quantity Per Unit) I want to do that same but on carslist.php
the word "Products" to combine these 3 columns (Trademark, Model and HP).


sangnandar
User
Posts: 980

Post by sangnandar »

You need to :

  1. Add "colspan" attribute into first <thead>.
  2. Remove the rest 3 <thead>'s.

Check <thead> elements in console F12, get your selector right, then run jQuery:
$('<first-thead>').attr('colspan','4');
$('<second-thead>').remove(); // repeat this line for third and fourth

Sadly it can't be done on server side. Unlike <td>, <thead> object has no "ViewAttrs" property. So your only option is client side.


Post Reply