Author Topic: Loading new JSON data set from a seperate function  (Read 3246 times)

Robert

  • Pro Economy
  • Newbie
  • *
  • Posts: 26
    • View Profile
Loading new JSON data set from a seperate function
« on: May 04, 2014, 01:06:19 am »
I am attempting to load a different new JSON data set, after initialization, from a separate function. The response I am getting has the correct JSON. HOWEVER, I am having an issue figuring out how to get the new JSON to view in the grid.

I have studied the API dataModel.data and tried using:
//setter
$( ".selector" ).pqGrid( "option", "dataModel.data", newData );

I have also looked at the dataModel.getData but that doesn't seem to work either.

I know I must be missing something obvious. Is there an example you could point me to or advise me on what I should be looking at as a solution?

Robert

  • Pro Economy
  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: Loading new JSON data set from a seperate function
« Reply #1 on: May 04, 2014, 04:27:05 am »
Please excuse this post. This would be good to know BUT I rethought the way I was trying to accomplish something and actually came up with a better/ cleaner way.

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Loading new JSON data set from a seperate function
« Reply #2 on: May 08, 2014, 02:54:47 am »
I have exactly the same problem. It used to work in non-pro version, but now when I upgraded it stopped working.

Please advise.

dbadmin

  • Pro Economy
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Re: Loading new JSON data set from a seperate function
« Reply #3 on: May 08, 2014, 03:09:32 am »
It looks like calling "refreshView" after updating data source solves the issue.

For people like me who didn't notice a section about migration to PRO, the link below was helpful:

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