Summary

In this chapter, we presented the GridView widget to display data, directly or relational. A fundamental topic when discussing GridView is DataProvider, which is a way to provide data to GridView. You learned how to get DataProvider from ActiveRecord, an array, or SQL, based on the available source.

After the first simple implementation of GridView, you comprehended the customization in a column and displayed the relational data coming from other tables, using an extension of the model class to add extra features as new attributes. Next, we illustrated how to filter data in GridView to select only specific rows.

Just before the end of the chapter, you saw how to show, summarize, and customize a footer and more in the GridView by subclassing ...

Get Yii2 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.