realtebo
(Mirkotebaldi)
1
I’m trying to do this, but I’m not able to do…
I’ve relation Client [1->N] Delivery
I’ve the detail view of client (’_view’).
I need to append here a filtered cgridview with all of delivery of this client.
This gridview can handle even thousands of rows, so it must be filtrable and sortable
How to step-by-step realize this ?
rootbear
(Alex Xm)
2
assume you have models: Client & Delivery link by client_id in Delivery model
in your Client model index view:
$criteria = new CDbCriteria;
$criteria->compare('client_id', $model->id);
$model_delivery = new Delivery('Search');
$dataProvider = new CActiveDataProvider($model_delivery, array(
'criteria' => $criteria,
));
then use CListView or CGridView to display delivery for this client.
here come my question:
*** how could we make use of relation defined in Client model for this purpose in stead?
realtebo
(Mirkotebaldi)
3
your solution work and I too ask:
*** how could we make use of relation defined in Client model for this purpose in stead? **