Hi everyone,
I try to explain my problem the best I can, because I’m really stucked atm. I would like to display a filtered GridView. The filter criteria is however a computed value.
I’ve got an Invoice-model, which has several positions (seperate model, called InvoiceDetail).
I’ve added a property to the invoice model, which has no corresponding field in the database (it displays the amount that is left for the invoice to be paied, the field is called “amountOpen” and is populated in the AfterFind()-method of the invoice model).
Now, I’m wondering how I can filter this data. CDbCriteria won’t work, because it would generate a WHERE-clause, which is useless, because I have no field called “amountOpen” in the database.
Is there a way to filter a cActiveDataProvider after the models got fetched?