sortingextjspaginationgridextjs4

Sort whole store in paging grid extjs 4


in my app I have a paging grid and when I click on a column to sort it, it sorts only the current page. How can I sort the whole store and then split it in pages? Can I override the sort function to send extra params to the php script that convert my database into a json store and edit the query adding a ORDER BY extraparam?


Solution

  • You need to enable remoteSort by setting remoteSort: true on the store instance. See remoteSort

    You will now receive the sorting as you receive the paging as own params-list and can include it into your query.