ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: nebels on June 13, 2015, 06:46:34 am

Title: get hold of data that includes current changes
Post by: nebels on June 13, 2015, 06:46:34 am
We are using batch editing - and about to write a validator that pops up a warning when the currently data which has just been entered is a non unique within the column. Our uniqueness check should also check against any unsaved changes (in the current batch editing session).   
$this.pqGrid("getData") seems to return the original data - what's the trick to get hold of data that includes unsaved changes?
Title: Re: get hold of data that includes current changes
Post by: Sunny on June 13, 2015, 07:43:20 am
'getChanges' method should help solve your problem:

http://paramquery.com/pro/api#method-getChanges (http://paramquery.com/pro/api#method-getChanges)
 
Title: Re: get hold of data that includes current changes
Post by: nebels on June 13, 2015, 10:56:12 am
Thanks for your quick reply.
Just to make sure that  I understand your suggestion;  in order to get hold of the data currently displayed in the grid (containing all changes) I have to merge the result from getData() and getChange() first together.  This is not a problem, but rather onerous ....
Title: Re: get hold of data that includes current changes
Post by: paramvir on June 15, 2015, 10:53:10 am
getData() alone is sufficient for your use case to get unique values currently displayed ( which includes uncommitted changes in current batch session ) in a column.