Features Of Cgridview

Hi, great job.

Id like to know if CGridView will have by default following features, optionals when you config widget in view f.i.:

  • Integration with bootstrap 3

  • Horizontal and Vertical scroll

  • Autowidth for columns

  • Fixed header, footer, X left columns

  • Export PDF, Excel, CSV, Word, txt…

It’s there.

What do you mean?

I think it’s there.

Not sure about this one.

Will not be supported in the core. Maybe an extension.

Hi, thanks for your answer

About horizontal & vertical scroll, i mean about when grid got to show several columns, it can show an horizontal scroll, in this way also a vertical scroll (if you dont want any pager)

Really i’ve made my own CGridView extension and i’ve added choice for creating horizontall scroll but id like to know if it could be get it in the new release. (if you want i could send you my code, it’s really simple).

Fixed or frozen header - footer - columns, got sense when it’s possible set scroll to grid.

Thanks in advance

If by next release you mean Yii 1.1 then you’re in a wrong forum. Here we’re discussing 2.0.

No, sorry, i was talking about 2.0, all new features of CGridView

Amongst the above, the horizontal scroll is supported in Yii2, simply because Yii2 has Twitter Bootstrap 3 inbuilt into its core. In order to achieve this, just wrap the grid in a container with table-responsive class.

<div class="table-responsive">

   <?php \yii\grid\GridView::widget($options); ?>


See an example of Bootstrap 3 responsive tables here.