holubj / NiftyGrid

DataGrid for Nette Framework
34 stars 34 forks source link

Added setSecondOrder() function #26

Open PingusPepan opened 12 years ago

PingusPepan commented 12 years ago

Added a setSecondOrder() function which allows to order the table by a second (third, fourth) column. I find it usable and use it very extensively. However support for other datasources different than NetteDatabase have to be created. It implements a new method multipleOrderData(). Please, check the source, test it and let me know.

Use as follows: For Grid: $this->setSecondOrder(array('url', 'ASC')); // Order by a second column url ascending

$this->setSecondOrder(array(array('url', 'ASC'), array('name', 'DESC'))); // Order by a second column url ascending, name descending