Jump to content

AtkDataGrid: Difference between revisions

From NusaATK
Marc (talk | contribs)
Fix another typo.
Marc (talk | contribs)
Behaviour is only a typo if you are a yank.
Line 2: Line 2:


==Modify datagrid==
==Modify datagrid==
To modify the behavior or layout of the datagrid you can add the method 'modifyDatagrid' to your AtkNode.
To modify the behaviour or layout of the datagrid you can add the method 'modifyDatagrid' to your AtkNode.


<code>   
<code>   

Revision as of 09:26, 22 December 2008

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);
   }