Sorting A Dataprovider

Good evening friends

I’m wondering if there a way to sort a dataprovider by City…for instant if the user comes from new-york the topics about NY shows first then other topics and if he comes from California the topics about California comes first then other topics… etc


Check this wiki: Dynamic Gridviews

See the last part of the searchIncludingPermissions function in the model. You can use it to sort the dataprovider on the default model’s fields or on a related model’s fields.