Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 425
andyts93 Avatar asked Jan 13 '23 22:01

andyts93


1 Answers

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.

like image 190
sra Avatar answered Jan 20 '23 05:01

sra