Answer the question
In order to leave comments, you need to log in
How to implement sorting in Grid?
So that there is paging using the PagingToolbar and the values are sorted by all data. Those. Here is a typical example of a grid implementation with paging:
dev.sencha.com/deploy/ext-4.0.0/examples/grid/pagi...
But if in the same example you go to the second page, then sorting by answers will no longer be the same as on the first page. And I need it through - according to all the data.
Is it really possible to do this? Can't google it... Thanks in advance.
Answer the question
In order to leave comments, you need to log in
In my opinion, in that example, everything is in order with sorting. The key property of the store is remoteSort: true, i.e. all sorting concerns are shifted to the back-end. You just need to catch the parameters that the paginator passes:
// параметры для пагинатора
$defaults = array(
'start' => 0, // с какой строки начинать
'limit' => 20, // сколько строк на странице
'sort' => null, // поле, по которому сортировать
'dir' => 'ASC' // направление сортировки
);
$params = array();
foreach ($defaults as $key=>$value) {
$params[$key] = $this->getRequest()->getParam($key, $value);
}
To make remote sorting probably? remoteSort was in the third version of ExtJs
If you look closely at this project , is it not suitable for your goals?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question