kartik-v / yii2-grid

Enhanced GridView with various utilities for Yii Framework 2.0
http://demos.krajee.com/grid
Other
558 stars 302 forks source link

Set default values by DI #1053

Open strtob opened 1 year ago

strtob commented 1 year ago

Dear all,

Does DI work with kartik gridview like this?

I've think the grid needs to be register first.

Best, Toby

`
Yii::$container->set(kartik\grid\GridView::class,
                [
                    'headerContainer' => null,
                    'tableOptions' => ['class' => 'table table-nowrap'],
                    'bordered' => false,
                    'striped' => false, // alternating line colors
                    'condensed' => false, // condense the height of the lines
                    'responsive' => true, // true, then uses http://getbootstrap.com/css/#tables-responsive
                    'responsiveWrap' => true, // group areas when stacked on smaller screen
                    'hover' => true, // higlight on hover           
                    'headerContainer' => null, //remove header css
                ],
        );