diff --git a/generators/crud/default/views/index.php b/generators/crud/default/views/index.php index 7613e7a..a5037c6 100644 --- a/generators/crud/default/views/index.php +++ b/generators/crud/default/views/index.php @@ -60,10 +60,9 @@ ]; -$simpleDynaGrid = new SimpleDynaGrid([ - 'dynaGridId' => 'dynagrid-getControllerID()?>-index', - 'columns' => $columns, +echo SimpleDynaGrid::widget([ 'dataProvider' => $dataProvider, + 'columns' => $columns, 'extraToolbar' => [ [ @@ -72,4 +71,3 @@ ] ]); -$simpleDynaGrid->renderDynaGrid(); diff --git a/generators/dynagrid/default/views/index.php b/generators/dynagrid/default/views/index.php index b9677f1..de65d31 100644 --- a/generators/dynagrid/default/views/index.php +++ b/generators/dynagrid/default/views/index.php @@ -64,10 +64,9 @@ ]; -$simpleDynaGrid = new SimpleDynaGrid([ - 'dynaGridId' => 'dynagrid-getControllerID()?>-actionIndex?>', - 'columns' => $columns, +echo SimpleDynaGrid::widget([ 'dataProvider' => $dataProvider, + 'columns' => $columns, ]); -$simpleDynaGrid->renderDynaGrid();