Wiki

Articles tagged with "cactivedataprovider"X
Displaying 1-5 of 5 result(s).

multiple CActiveDataProviders in one CGridView

Created 10 months ago by KonApazHow-tos5 comments – viewed 7,939 times – ( +7 / -1 )
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

CGridView, CListView and CActiveDataProvider

Created about a year ago by softarkTutorials21 comments – viewed 66,608 times – ( +45 ) – version 1.1
CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

1:n relations sometimes require CDbCriteria.together

Created 2 years ago by fsbTips4 comments – viewed 22,191 times – ( +16 ) – version 1.1
There are situations in which Active Record will generate nonsense queries from what a nieve Yii user might think is reasonable code. One such situation is a CActiveDataProvider using CDbCriteria to get data from parent and 1:n child table with a condition on the child table.

Using cache in CActiveDataProvider

Created 2 years ago by StammTips7 comments – viewed 13,092 times – ( +19 ) – version 1.1
First param in CActiveDataProvider could be a string with model name or instance of class. So, you may use CActiveRecord::cache() for cache, but you need set third param to 2, because you should cache 2 queries: counting and get data.

An easy way to use escopes and CActiveDataProvider

Created 3 years ago by Rafael GarciaTips8 comments – viewed 19,096 times – ( +1 / -1 ) – version 1.1
Often used scopes to define criteria in our models. This is a very useful feature as it ensures that in any part of application applying the criteria defined by the scope when called it.