Author Topic: It gets automatically sort by first column when using getData  (Read 2008 times)

cyriljose

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 2
    • View Profile
It gets automatically sort by first column when using getData
« on: August 23, 2018, 06:53:32 pm »
For Example:
Below is the data order i put in the Grid,
[{"0":"3"},{"0":"2"},{"0":"1"},{"0":"4"},{"0":"7"},{"0":"5"},{"0":"8"},{"0":"9"},{"0":"6"}]

Below is the data order when retrieve data using getData,
[{"0":"1"},{"0":"2"},{"0":"3"},{"0":"4"},{"0":"5"},{"0":"6"},{"0":"7"},{"0":"8"},{"0":"9"}]

i want the same order what i put in the Grid when retrieve data from Grid.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: It gets automatically sort by first column when using getData
« Reply #1 on: August 24, 2018, 10:33:44 am »
Please use

Code: [Select]
  grid.option('dataModel.data')

cyriljose

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: It gets automatically sort by first column when using getData
« Reply #2 on: August 24, 2018, 12:30:29 pm »
Now it's working, Thanks for the response admin.