AshishJoshi-asj / zfdatagrid

Automatically exported from code.google.com/p/zfdatagrid
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

(idea) ExtraRow #194

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
What is the expected output? What do you see instead?

Possibility to add an extra row, whose content will be defined at the
moment of the definition of the grid (nothing to see with the DB)

For a grid with 6 columns, A kind of :
// create an extra row
$extraRow = new Bvb_Grid_ExtraRow();
$extraRow->setFields(array(
    '', // empty field
    '', // empty field
    array('title' => 'An', 'colspan' => 1, 'class' => 'myclass'),
    array('title' => 'extra', 'colspan' => 2, 'class' => 'myotherclass'),
    array('title' => 'row', 'colspan' => 1, 'class' => 'myclass'),
));

// add it
<$grid>->addExtraRow(<position>, $extraRow);

Position could be :
'<AFTER|BEFORE>_<HEADERS|FILTERS|SQLEXPTABLE|PAGINATION>', that is to say
'BEFORE_HEADERS', 'AFTER_PAGINATION', ...

What version of the product are you using? On what operating system?
v0.6 alpha, under Fedora.

Please provide any additional information below.

Original issue reported on code.google.com by tribal...@gmail.com on 26 Feb 2010 at 3:12

GoogleCodeExporter commented 9 years ago
Great idea.

Don't know if will be on version 0.6, but will try.

Thanks.

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 26 Feb 2010 at 3:17

GoogleCodeExporter commented 9 years ago
Hi,

Add extra Rows to a table:

Availbale positions:
beforeHeader
afterHeader
beforeTitles
afterTitles
beforeFilters
afterFilters
beforeSqlExpTable
afterSqlExpTable
beforePagination
afterPagination

Example:
$rows = new Bvb_Grid_ExtraRows();
$rows->addRow('beforeHeader',array(
                '', // empty field
                array( 'colspan' => 1, 'class' => 'myclass', 'content'=>'my
content'),
                array('colspan' => 2, 'class' => 'myotherclass',
'content'=>'some '),
                array('colspan' => 1, 'class' => 'myclass', 'content'=>'flowers
:) '),
            ));
$grid->addExtraRows($rows);

You don't need to worry about extra columns. The colspan will be automatic.

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 27 Feb 2010 at 2:34

GoogleCodeExporter commented 9 years ago
Hi,

It looks that only the exampled one, "beforeHeader", doesn't display anything. 
:-)

Original comment by vlatko.b...@gmail.com on 28 Feb 2010 at 10:41

GoogleCodeExporter commented 9 years ago
Hi,

Check now.

Best Regards,
Bento Vilas Boas

Original comment by pao.fre...@gmail.com on 28 Feb 2010 at 4:39

GoogleCodeExporter commented 9 years ago
It works now.

Original comment by vlatko.b...@gmail.com on 1 Mar 2010 at 8:51

GoogleCodeExporter commented 9 years ago

Original comment by pao.fre...@gmail.com on 1 Mar 2010 at 2:28

GoogleCodeExporter commented 9 years ago

Original comment by bento.vi...@gmail.com on 3 Mar 2010 at 4:56