Grid Layout not changing

Trying to change the Grid layout using the $layout property, but does not seem to work. Even tried changing the framework code to be sure and does not take effect. I did clear cache as well.

<?= GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        ['class' => 'yii\grid\SerialColumn'],

Maybe you’re changing wrong code?

I double checked and this time it worked! Not exactly sure what happened - perhaps some caching issue. Thanks samdark for confirming this should work the way I have it.