ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Webauthor on October 15, 2016, 07:24:34 am

Title: sortModel not showing sort indicator when type is remote
Post by: Webauthor on October 15, 2016, 07:24:34 am
Hi, when setting an initial sort e.g.

sortModel: {"cancel":false,"sorter":[{"dataIndx":"Activity_ToDate","dir":"down"}],"type":"remote","on":true}

The sorting indicator is not visible

e.g.
https://martin-dev.samis.io/go/view/pq-grid-test.cfm

If I change type="local" it shows the triangle, but of course the sorting is not working because it needs to be remote.

Can you please take a look?

Thanks
Title: Re: sortModel not showing sort indicator when type is remote
Post by: paramvir on October 15, 2016, 09:52:00 am
I could see the issue at your mentioned url but unable to reproduce the issue at my end with the remote sorting example: http://paramquery.com/pro/demos/sorting_remote with similar sortModel options.

Can you please share an isolated test case/ jsfiddle.
Title: Re: sortModel not showing sort indicator when type is remote
Post by: Webauthor on October 21, 2016, 03:39:39 am
Hi, isn't what I gave you a standalone? 

Do you have a base JSFiddle I can use to then add my unique code?
Title: Re: sortModel not showing sort indicator when type is remote
Post by: paramvir on October 21, 2016, 09:04:47 am
Sorry by standalone I mean only pqgrid related files in the document.

Please use this as base jsfiddle: http://jsfiddle.net/5yg81u60/ or if you can send it as an attachment, that would also do.
Title: Re: sortModel not showing sort indicator when type is remote
Post by: Webauthor on October 21, 2016, 10:32:04 am
Ahh, I found the issue.

If you look at the same example you gave me.
http://paramquery.com/pro/demos/sorting_remote

and replace line 21:

url: "/pro/orders/get" //for ASP.NET

with:

getUrl: function(ui) {return {url:"/pro/orders/get",data:{}}}

You will see the issue in place.
Title: Re: sortModel not showing sort indicator when type is remote
Post by: paramvir on October 24, 2016, 07:39:16 am
Thanks got it.

Please use the dataModel.url option to specify url

and

use dataModel.postData option to send any extra parameters to remote scripts.

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