jQWidgets Forums

jQuery UI Widgets Forums Grid detect data changes

This topic contains 6 replies, has 2 voices, and was last updated by  jonno 9 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • detect data changes #80937

    jonno
    Participant

    Hi Folks,

    I have a grid bound to a dataadapter which uses json to get remote data.
    I want to get the remote data every few seconds, detect changes before rendering the grid.

    What is the best way to do this?
    what methods and events should i use?

    Many thanks

    J

    detect data changes #80951

    Peter Stoev
    Keymaster

    Hi jonno,

    bindingcomplete event is raised whenever the Grid’s data binding is completed or Grid’s re-binding is completed. So you can use it to detect when your data chagnes.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    detect data changes #80971

    jonno
    Participant

    Hi Peter,

    I’m actually trying to detect data changes and process the data before the grid is rendered.

    The dataadapter has beforeLoadComplete event with originalrecords and newrecords.
    I was thinking using this event to determine the changed data?

    detect data changes #80972

    Peter Stoev
    Keymaster

    Hi jonno,

    If it is your solution, you can use it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    detect data changes #80990

    jonno
    Participant

    Peter, I cannot get this working – beforeLoadComplete (newrecords, originalrecords)

    originalrecords doesn’t hold the old records. originalrecords and newrecords contain same data.

    detect data changes #80998

    Peter Stoev
    Keymaster

    Hi jonno,

    Yes, it’s called originalrecords, not oldrecords. It’s called originalrecords because that’s the data without any manipulations from jqxDataAdapter.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    detect data changes #81049

    jonno
    Participant

    now i understand.. that would be good in the documentation.

    Thanks

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.