Author Topic: Get dataModel.data in order currently displayed  (Read 2580 times)

mrgreen123

  • Newbie
  • *
  • Posts: 3
    • View Profile
Get dataModel.data in order currently displayed
« on: January 28, 2019, 09:06:49 pm »
I have the following code which gets the data.

Code: [Select]
data = JSON.stringify(obj.dataModel.data);
console.log( data );

However this is in the order originally placed in the object, if I sort a column the data is in a different order, is there a way to get the data in the order set?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Get dataModel.data in order currently displayed
« Reply #1 on: January 28, 2019, 10:21:24 pm »
Please use this

Code: [Select]
var data = $grid.pqGrid('option', 'dataModel.data');