ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: nghiemhd on September 23, 2013, 10:01:21 am

Title: How to sort by multiple columns with sorting = "local"?
Post by: nghiemhd on September 23, 2013, 10:01:21 am
Hi everyone,

I have a json data with these fields: EmployeeId, Name, DOB, Title
I want to sort data in client and by multiple columns (with order by sortedColumn, DOB, EmployeeId)
For example:
If sort by Name, data will order by Name, DOB, EmployeeId
If sort by Title, data will order by Title, DOB, EmployeeId
If sort by DOB, data will order by DOB, EmployeeId

How can I do this? Thank you very much


Title: Re: How to sort by multiple columns with sorting = "local"?
Post by: paramvir on September 23, 2013, 02:07:13 pm
There is inbuilt support for multiple column sorting in Pro version.

http://paramquery.com/pro/api#option-dataModel-sortIndx


In base version you have to implement multiple column sorting yourself by listening to beforeSort event and returning false.

http://paramquery.com/api#event-beforeSort