dataGrid()->getNamespace(); // data store url $url = $this->url( array( 'module' => 'user', 'controller' => 'role', 'action' => 'index', 'format' => 'json' ) ); // set up data grid columns $columns = array( 'id' => array( 'label' => 'Name', 'width' => '61%' ), 'type' => array( 'width' => '20%' ), 'usersCount' => array( 'label' => 'Users', 'width' => '10%' ) ); if (count($this->actions)) { $columns[] = $this->dataGrid()->getDefaultActionsColumn(); } // set up footer buttons $buttons = array( 'Add Role' => array( 'attribs' => array( 'class' => 'add-button', 'onclick' => $namespace . '.Utility.openFormDialog("add");' ) ) ); print $this->dataGrid( $namespace, array( 'form' => $this->form, 'url' => $url, 'pageSize' => $this->pageSize, 'actions' => $this->actions, 'columns' => $columns, 'footer' => array( 'buttons' => $buttons ), 'attribs' => array( 'disableSort' => array('_item', 'usersCount') ) ) );