Container column

Info Container column have default disabled ordering and filtering


Methods for Mesour\DataGrid\Column\Container

Method Default Possible values Returns Required Description
addText none string $name, $header = NULL Mesour\DataGrid\Column\Text no Add column text
addDate none string $name, $header = NULL Mesour\DataGrid\Column\Date no Add column date
addContainer none string $name, $header = NULL Mesour\DataGrid\Column\Container no Add column container
addImage none string $name, $header = NULL Mesour\DataGrid\Column\Image no Add column image
addStatus none string $name, $header = NULL Mesour\DataGrid\Column\Status no Add column status
addTemplate none string $name, $header = NULL Mesour\DataGrid\Column\Template no Add column template
addButton none string $name, $header = NULL Mesour\UI\Button no Add button
addDropDown none string $name, $header = NULL Mesour\UI\DropDown no Add dropdown
addComponent none Mesour\UI\Control $control, $name = NULL Mesour\UI\Control no Add control
setCallback none callable $callback Mesour\DataGrid\Column\Container no Fired before component is rendered. Container will add to column output from this callback

Callback parameters for method setCallback

Parameter Type Description
$column Mesour\DataGrid\Column\Container Container column instance
$rowData Mesour\Sources\ArrayHash / Entity / ActiveRow Data for current row
$span Mesour\Components\Html Span instance, can change it
$control Mesour\Comopnents\Control Current control / column / button / dropdown


Info See onRenderon events page


$mesourApp = //instance Mesour\Components\Application\IApplication
$source = //some <a href="" target="_blank">data source</a> or two-dimensional array

$grid = new Mesour\UI\DataGrid('containerDataGrid', $mesourApp);



//! here create container column
$container = $grid->addContainer('surname', 'Name')

//! here add columns to container
$container->addText('surname', 'Surname');

$container->addText('name', 'Name');

$grid->addText('email', 'E-mail');

//! here create container column for actions
$container = $grid->addContainer('actions', 'Actions')

//! here add buttons to container
    ->setAttribute('href', '#');

    ->setConfirm('Really delete item?')
    ->setAttribute('href', '#');



Doe John john.doe@test.xx
Larson Peter peter.larson@test.xx
Graves Claude claude.graves@test.xx
Norman Stuart stuart.norman@test.xx
Arnold Kathy kathy.arnold@test.xx