Author Topic: get hold of data that includes current changes  (Read 3132 times)

nebels

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
get hold of data that includes current changes
« 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?

Sunny

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 59
    • View Profile
Re: get hold of data that includes current changes
« Reply #1 on: June 13, 2015, 07:43:20 am »
'getChanges' method should help solve your problem:

http://paramquery.com/pro/api#method-getChanges
 

nebels

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: get hold of data that includes current changes
« Reply #2 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 ....

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: get hold of data that includes current changes
« Reply #3 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.
« Last Edit: June 15, 2015, 11:00:58 am by paramquery »