Can anyone guide me please how to create a custom sort filter(say):‘rating’ which is not stored in database but only calculated in my model.Rest all the columns are working fine with GridView widget and ActiveDataProvider but I’m confused to enable sorting for this particular field:
With this it is possible to sort attributes that don’t come from the database, you can even use this directly with your data provider through the method setSort() (check here)