Cgridview Carraydataprovider Sort

I send to widget array and set sorting and also pagination is on

                $itemsProvider = new CArrayDataProvider($result,array(







                $this->render('redemption', compact('itemsProvider'));

But sorting is used only for current page, but how to use it for all array.

For example i have in 1st page 2 names starting with A letter, and at the second page one name with beginning of A letter

If to sort by name, i need to get at the beginning of 1st page 3 names beginning with A letter,but at the current moment i get only 2 from current,but didn’t use data from the second page

Array is sorting only by current page.

Question closed,find the answer :rolleyes: