Categories > TinyButStrong general >

Nested Row + headergrp

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Martin
Date: 2012-03-07
Time: 17:14

Nested Row + headergrp

Hi Skrol, long time with out need some help, but i cant find the way to do that.

I have a table with (head) invoices, and another with (detail) invoices.
The idea is use the headergrp with id_header and then the id_detaill of each invoices in one table.
But i wish to have a table with one row for the "head" and when press "+" appear the hidden row with the detail.

This is the idea :

The table are like this:
<table>
   <tr>
    <th></td>
    <th>Invoice Nro.</th>
    <th>Total</th>
   </tr>
   <tr>[blk1;block=tr+tr;headergrp=id_head;]
    <td><a href="onclick=$('tr1').toogle();'>+</a></td>
    <td>00001</td>
    <td>2500</td>
   </tr>
   <tr id="tr1" style="display:none">
     <td colspan="3">
       <table>
         <tr>
           <th>Product Name</th>
           <th>Quantity</th>
           <th>Price</th>
         </tr>
         <tr>
           <th>[blk1.book_name;block=tr;]</th>
           <th>[blk1.quantity;]</th>
           <th>[blk1.parcial;]</th>
         </tr>
       </table>
     </td>
   </tr>
</table>

I try to put in
[blk1.book_name;block=tr;headergrp=id_detail]

The code for "header" work well, the problem is when press "+" just show me one row.

I hope you understand the idea.

Thanks like ever for your help,

Martin
By: Skrol29
Date: 2012-03-07
Time: 22:17

Re: Nested Row + headergrp

Hi Martin,

You should use "parentgrp" instead of "headergrp" in your first snippet.

By: Martin
Date: 2012-03-07
Time: 22:44

Re: Nested Row + headergrp

Thanks a lot Skrol !!!