ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: forwheeler on December 18, 2013, 08:13:32 pm

Title: Local sorting ignores new record
Post by: forwheeler on December 18, 2013, 08:13:32 pm
After I add a new record it appears at the bottom of the grid. The local sorting ignores the new record and it remains at the bottom.
Is there a way to either add it to the top or to have the sort work with the new record? I tried to use refresh instead of refreshDataAndView after the push and but it doesn't help.

I do it in this order:
data.push(row)
Add record to database
refreshDataAndView
try to sort new record and it remains at bottom of grid
Title: Re: Local sorting ignores new record
Post by: paramvir on December 19, 2013, 08:34:14 am
refreshDataAndView refreshes the sort order.

It works in the following order

reload data -> refresh sort -> refresh view

The closest demo to what you are trying to do is http://paramquery.com/demos/crud_remote

I believe your issue might be related to case sensitivity of strings while sorting by pqGrid. You may need to use custom sort.
Title: Re: Local sorting ignores new record
Post by: forwheeler on December 19, 2013, 06:41:50 pm
Yes it was related to case sensitivity. Do you have a demo for a custom sort?

If I upgrade to the pro version will my code remain mostly the same and I can add features later?
Title: Re: Local sorting ignores new record
Post by: paramvir on December 20, 2013, 05:46:54 pm
Custom sorting demo is here http://paramquery.com/demos/sorting_custom

There are few differences between BASE and PRO version which are mentioned here

http://paramquery.com/pro/tutorial#topic-migration

Please refer to API for details.

http://paramquery.com/pro/api