CActiveDataProvider With Custom Query

Prem Tiwari - - Yii framework

In This post i will explain the CActiveDataProvider With Custom Query. CActiveDataProvider everytime to retrieve the data for CGridView. But one of my project needed custom query in criteria and have to show the result in CGridView. Below is the source code for you that is enable the custom query in the model.

Component MyActiveDataProvider

Add this class inside “protected/components”.

Custom Query In Model

CGridview List Of Group Search

About: Prem Tiwari

Prem Tiwari is the founder of and also a professional developer who has vast experience in PHP and open source technologies. Apart from this, he is a blogger by hobby and also he has been a regular speaker of WordPress sessions in various IT Companies.

Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.