jQWidgets Forums

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: detect data changes detect data changes #81049

    jonno
    Participant

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

    Thanks

    in reply to: detect data changes 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.

    in reply to: detect data changes 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?


    jonno
    Participant

    Hi Peter,

    I like the idea of detecting changes in the data for the grid to render where required.
    What data structures are required to use observable array?
    Could i continuously convert the json data into a local array for observable array to use?


    jonno
    Participant

    I was preparing the jsfiddle and i noticed https://jqwidgets.com/public/jqwidgets/jqx-all.js is now jqwidgets-ver3.9.0

    I tested my existing code from jqwidgets-ver3.8.2 to use jqwidgets-ver3.9.0 and it no longer has the error.

    The error has been fixed in your jqwidgets code somewhere between ver3.8.2 to 3.9.0.

    FYI, since using 3.9.0 i’ve noticed nothing else broken, all good.


    jonno
    Participant

    When i simply revert from jqwidgets-ver3.8.2 back to jqwidgets-ver3.6.0 (no other code changes) the problem does not occur.
    So something underlying has changed.

    I’ll try and get a jfiddle to demonstrate the problem.

    in reply to: Theme Builder – not loading Theme Builder – not loading #76784

    jonno
    Participant

    ok got it.

    Thank you Peter.

    in reply to: grid event sequence grid event sequence #68800

    jonno
    Participant

    Peter

    You’re absolutely right there, I’m lucky to have a very simple requirement at this stage.

    In a future version i would like to know which data cells to colourise to signify change.

    I’m guessing comparing the records array from beforeLoadComplete(records) function with another records array of the existing grid recordset?

    Is there an internal array for existing records? or it is accessed via getrowdata?
    var data = $(‘#jqxGrid’).jqxGrid(‘getrowdata’, 0);

    in reply to: grid event sequence grid event sequence #68791

    jonno
    Participant

    Peter,

    Thanks for your help.

    For those interested:-

    I used a $(“#jqxgrid”).jqxGrid(“getdatainformation”).rowscount to obtain the current count of rows.
    Then compared to the array passed in from beforeLoadComplete(records) function

    records.length > $(“#jqxgrid”).jqxGrid(“getdatainformation”).rowscount // Check if new records?

    in reply to: grid event sequence grid event sequence #68775

    jonno
    Participant

    Hello Peter,

    Thank you for your response.

    I’ve attempted to use the beforeLoadComplete function.
    From what i understand this function takes two parameters being the new records and old records arrays.
    What i observe is that new and old record arrays are the same, i.e. no difference.
    Am i using this function correctly?

    I first use $(‘#jqxgrid’).jqxGrid(‘updatebounddata’); to get data.
    Then wait in beforeLoadComplete function to determine differences in the data.
    I compare the new and old arrays for any difference but the arrays are the same.

    Here is my code

    refresh_data = function () {
    $(‘#jqxgrid’).jqxGrid(‘updatebounddata’);
    }

    var dataAdapter = new $.jqx.dataAdapter(source,
    {
    formatData: function (data) {
    return “{}”;
    },
    beforeLoadComplete: function (newrecords,oldrecords) {
    if (newrecords.length > oldrecords.length) { // code break here shows both arrays are the same.
    $.playSound(‘sounds/alarm.mp3’);
    }
    return newrecords;
    }

    });

    in reply to: pager items – making bigger pager items – making bigger #68650

    jonno
    Participant

    Thank you for this.

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