grid\GridView $rowOptions

$rowOptions public property

The HTML attributes for the table body rows. This can be either an array specifying the common HTML attributes for all body rows, or an anonymous function that returns an array of the HTML attributes. The anonymous function will be called once for every data model returned by $dataProvider. It should have the following signature:

function ($model, $key, $index, $grid)
  • $model: the current data model being rendered
  • $key: the key value associated with the current data model
  • $index: the zero-based index of the data model in the model array returned by $dataProvider
  • $grid: the GridView object

See also yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.

doc_Yii
2016-10-30 17:04:17
Comments
Leave a Comment

Please login to continue.