How to add the pagination dropdown list in GridView in Yii2

category:  Yii2.0 framework

Earlier, I wrote how to add the summary footer in the gridview widget. The grand total column will sum all the total columns on each page and the default page size of gridview is 20 items per page. I want to be able to change the page size as I want in order to see the new grand total if I choose the search filter. Below is the screenshot that I did. We will add the extra code in two … Read More

How to add the summary in the Gridview footer in Yii2

category:  Yii2.0 framework

Currently, I am building the invoice feature in my own application with Yii2. I use the gridview widget for displaying all invoices data. I want to add the grand total for all invoices. Just like the screenshot below. To do that, I have to add the extra code in two places. Note that, I generate the CRUD from Gii. So I will show only the code that I add for displaying the grand total at the gridview footer. First place, … Read More

Multiple grids on one page in Yii2

category:  Yii2.0 framework

Recently I upgrade my application and I add two Gridview widgets on one page. Everything seems working fine until I notice the pagination of all Gridview widgets won’t work properly. There are two issues that I found.   Issue #1 One issue is every time I click on one of pagination of any Gridview widget, all paginations changed. For example, I click on page number 5 of one of the paginations and other paginations change to 5 as well. To fix … Read More