AtkDataGrid: Difference between revisions
Appearance
New page: {{class|atk/datagrid}} |
add the remove component options list |
||
| (9 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{class|atk/datagrid}} | {{class|atk/datagrid}} | ||
==Modify datagrid== | |||
To modify the behaviour or layout of the datagrid you can add the method 'modifyDatagrid' to your AtkNode. | |||
<code> | |||
/** | |||
* Modify grid. | |||
* | |||
* @param atkDataGrid $grid grid | |||
* @param int $mode CREATE or RESUME | |||
*/ | |||
public function modifyDataGrid(atkDataGrid $grid, $mode) | |||
{ | |||
// Remove the record count summary in the bottom right of the datagrid | |||
$grid->removeComponent("summary"); | |||
// Change the default limit on a node (Show less or more items on a single page) | |||
$grid->setDefaultLimit(123); | |||
} | |||
</code> | |||
The removeComponent method can take at least the following arguments: | |||
* summary | |||
* list | |||
* index | |||
* norecordsfound | |||
* paginator | |||
* limit | |||
Latest revision as of 11:00, 18 June 2010
|
Classname: atkDataGrid
|
Modify datagrid
To modify the behaviour or layout of the datagrid you can add the method 'modifyDatagrid' to your AtkNode.
/**
* Modify grid.
*
* @param atkDataGrid $grid grid
* @param int $mode CREATE or RESUME
*/
public function modifyDataGrid(atkDataGrid $grid, $mode)
{
// Remove the record count summary in the bottom right of the datagrid
$grid->removeComponent("summary");
// Change the default limit on a node (Show less or more items on a single page)
$grid->setDefaultLimit(123);
}
The removeComponent method can take at least the following arguments:
- summary
- list
- index
- norecordsfound
- paginator
- limit