Hi all!
I have a small problem with the CGridView filter. I’m using a regular grid view and can filter all columns, also across relations. However, my model has a virtual attribute that needs to be calculated every time the model is accessed. I have a [font=“Courier New”]getMyPropery()[/font] method, that returns [font=“Courier New”]true[/font] or [font=“Courier New”]false[/font]. In my grid view I want to filter by this property.
Now, I have a regular [font=“Courier New”]search()[/font] function and use [font=“Courier New”]CDbCriteria[/font] to compare the db columns and virtual attributes. This doesn’t work for my [font=“Courier New”]getMyPropery()[/font] method though, because there is no database column to compare.
Is this even possible? And if so, how?
Thanks!