Property |
Type |
Description |
|
$allowBatchToggle |
|
allow batch expansion or batch collapse of all rows by clicking the header indicator. Defaults to
true. |
|
$collapseAllTitle |
|
title to display on hover of collapse indicator at header. |
|
$collapseIcon |
|
icon for the collapse indicator. If this is not set, it will derive values automatically using the
following rules:
- If GridView bootstrap property is set to true, it will default to [[GridView::ICON_COLLAPSE]]
or
- If GridView bootstrap property is set to false, then it will default to -. |
|
$collapseTitle |
|
title to display on hover of collapse indicator for each row. |
|
$defaultHeaderState |
|
default state of the header. The following values can be set:
- [[GridView::ROW_COLLAPSED]]: Will set all rows to collapsed and display the [[expandIcon]].
- [[GridView::ROW_EXPANDED]]: Will set all rows to expanded and display the [[collapseIcon]]. |
|
$detail |
|
the detail content (html markup) to be displayed in the expanded row. Either [[detail]]
or [[detailUrl]] must be entered. This can be a normal html markup or an anonymous function that returns the
markup. The anonymous function should have the signature:
function ($model, $key, $index, $column), where:
- $model: _\yii\base\Model_, is the data model.
- $key: _string|object_, is the primary key value associated with the data model.
- $index: _integer_, is the zero-based index of the data model among the model array returned by [[dataProvider]].
- $column: _ExpandRowColumn_, is the column object instance. |
|
$detailAnimationDuration |
|
the animation duration to slide up/down the detail row. |
|
$detailOptions |
|
the HTML attributes for the expanded table row. This can be an array or an anonymous function
of the signature:
function ($model, $key, $index, $column), where:
- $model: _\yii\base\Model_, is the data model.
- $key: _string|object_, is the primary key value associated with the data model.
- $index: _integer_, is the zero-based index of the data model among the model array returned by [[dataProvider]].
- $column: _ExpandRowColumn_, is the column object instance. |
|
$detailRowCssClass |
|
the CSS class for the detail content table row. |
|
$detailUrl |
|
the url/action that would render the detail content via ajax. Either detail OR detailUrl must be
entered. The ajax response must return the content/markup to render. The extension automatically passes the
following data parameters to the server URL as POST data:
- expandRowKey the key associated with the data model
- expandRowIndex the zero-based index of the data model among the models array returned by
[[GridView::dataProvider]]. |
|
$disabled |
|
whether the expand icon indicator is disabled. Defaults to false. If set to true, one
cannot collapse or expand the sections. This can be setup as an anonymous function having the signature:
function ($model, $key, $index, $column), where:
- $model: _\yii\base\Model_, is the data model.
- $key: _string|object_, is the primary key value associated with the data model.
- $index: _integer_, is the zero-based index of the data model among the model array returned by [[dataProvider]].
- $column: _ExpandRowColumn_, is the column object instance. |
|
$enableCache |
|
whether to enable caching of expanded row content while expanding the row using ajax triggered
action (applicable when detailUrl is set). Defaults to true. |
|
$enableRowClick |
|
whether to toggle the expansion/collapse by clicking on the table row. To disable row click for
specific elements within the row you can add the CSS class kv-disable-click to tags/elements to disable
the toggle functionality. |
|
$expandAllTitle |
|
title to display on hover of expand indicator at header. |
|
$expandIcon |
|
icon for the expand indicator. If this is not set, it will derive values automatically using the
following rules:
- If GridView bootstrap property is set to true, it will default to [[GridView::ICON_EXPAND]]
or
- If GridView bootstrap property is set to false, then it will default to +. |
|
$expandOneOnly |
|
whether to allow only one row to be expanded at a time and auto collapse other expanded rows
whenever a row is expanded. Defaults to false. |
|
$expandTitle |
|
title to display on hover of expand indicator for each row. |
|
$extraData |
|
additional data that will be passed to the ajax load function as key value pairs |
|
$hAlign |
|
|
|
$hiddenFromExport |
|
|
|
$mergeHeader |
|
|
|
$onDetailLoaded |
|
the javascript callback to execute after loading the content via ajax. Only applicable
when detailUrl is provided. |
|
$rowClickExcludedTags |
|
list of tags in the row on which row click will be disabled. |
|
$value |
|
the value of this attribute will identify the state of the current row. The following values
are supported:
- [[GridView::ROW_EXPANDED]] or 0: the row will be expanded by default and will display the collapse indicator.
- [[GridView::ROW_COLLAPSED]] or 1: the row will be collapsed by default and will display the expand indicator.
- [[GridView::ROW_NONE]] or -1: no indicator will be displayed for the row.
If this is not set, $model[$attribute] will be used to obtain the value. If this value is evaluated as empty
or null, it is treated as [[GridView::ROW_NONE]]. This can also be an anonymous function that returns one of
the values above. The anonymous function should have the signature function ($model, $key, $index, $column),
where:
- $model: _\yii\base\Model_, is the data model.
- $key: _string|object_, is the primary key value associated with the data model.
- $index: _integer_, is the zero-based index of the data model among the model array returned by [[dataProvider]].
- $column: _ExpandRowColumn_, is the column object instance. |
|
$width |
|
|
|