jQuery UI Widgets Forums Grid getdisplayrows updates bound array

This topic contains 4 replies, has 2 voices, and was last updated by  wsundet 6 days, 5 hours ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • getdisplayrows updates bound array #114616

    wsundet
    Participant

    My grid uses a local array as the data source. Is there a method that will allow me to use getboundrows to fill the grid, do adds/deletes/changes, and then use getdisplayrows as the data to update the bound array in a single operation?
    Thank you

    getdisplayrows updates bound array #114626

    Hristo
    Participant

    Hello wsundet,

    It will be better if you could provide us with more details.
    I am not sure what is your final goal.
    The getboundrows method returns an array with all loaded records in the jqxGrid.
    On the other hand, the getdisplayrows method returns an array of records that are currently displayed there depends on sorting, filtering, paging, and grouping.
    I look forward to hearing from you.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    getdisplayrows updates bound array #114633

    wsundet
    Participant

    I have a native app with jqxGrid that uses a local array as the data source. The contents of the array needs to be used to update a client-side SQLlite database. When the app starts, an SQLlite query is done to load the array which then populates the Grid. The user interacts with the Grid, add/update/delte using the standard functions associated with the grid. When finished, the users “saves” the grid. When the user does the “save” of the updated Grid contents, how do I update the array with the new contents of the Grid? Once the array is updated, I do an INSERT into the database. At that point, the grid, array, and database should all have the same data.

    I’m sure I have missed the Method to do this. I need to understand how to push the updated Grid data back to the array..

    Thank you.

    getdisplayrows updates bound array #114635

    Hristo
    Participant

    Hello wsundet,

    If you use local data then you should update the variable with the newer records.
    In case you have Server-Side logic then you should update the database with these new records.
    I would like to suggest you look at this tutorial:
    https://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-crud.htm?search=
    It will be better if you could provide us with a simple code snippet (or whole example) that represents your case.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    getdisplayrows updates bound array #114645

    wsundet
    Participant

    Thank you, that was VERY helpful!

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

You must be logged in to reply to this topic.