Author Topic: Local Storage  (Read 10517 times)

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6087
    • View Profile
Re: Local Storage
« Reply #15 on: May 16, 2018, 10:29:24 pm »
Your jsfiddle contains code directly copied from localforage project and grid json demo without any integration.

Sorry to say I can't help you with integration as I don't have any knowledge of using localforage.

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: Local Storage
« Reply #16 on: May 17, 2018, 05:00:38 am »
No its just a quick paste, the console.log(value) is the successful promise when, and the integration is there....  that is when it binds to the datamodel.... , i am doin another log to verify the value.. how are you handling async right now?

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: Local Storage
« Reply #17 on: May 17, 2018, 09:10:35 pm »
Ok was too tunnel vision here... I just need to chain my events out for the loads, and hit paramquery after I get the promise... thanks for your help...

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6087
    • View Profile
Re: Local Storage
« Reply #18 on: May 17, 2018, 10:59:15 pm »
Question relevant to grid is "How to assign local data to grid dynamically after initialization?"

Solution:

Code: [Select]
    $("#grid_json").pqGrid('option', 'dataModel.data', value)
    $("#grid_json").pqGrid('refreshDataAndView');

I don't have knowledge of localforage but this seems to work:

http://jsfiddle.net/t0efofk4/6/

Hope it helps.

mercury85

  • Pro Enterprise
  • Jr. Member
  • *
  • Posts: 58
  • ASP.NET, VB.NET, MVC, JS, C#, VBA, SQL, MDX, DAX
    • View Profile
Re: Local Storage
« Reply #19 on: May 18, 2018, 08:54:59 am »
That is perfect!!!  Now to finish up my service workers :)