jQuery UI Widgets Forums Angular Grid Updates Act Differently After Filter Applied

This topic contains 7 replies, has 2 voices, and was last updated by  chuckm 2 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author

  • chuckm
    Participant

    Hello!

    I’m using the jqxGrid and am updating data on a newly added row, however, it seems to act differently when a filter is applied versus when no filter applied.

    I have an example here: https://codesandbox.io/s/grid-doesnt-update-when-filtered-spp7p2

    Scenario #1 (no filter):
    If you click the Add Row button and then update the Units In Stock, the value for the Units In Stock will update in the grid without issue.

    Scenario #2 (filter applied):
    Refresh the page to reset.
    Now, add a filter to the Quantity per Unit column (Show rows where: equal 4).
    Click Add Row and update the Units In Stock value. No changes are applied to the grid.

    There may be a better way to do this, however, I would expect it to work the same regardless of whether a filter was applied or not and assume this is a bug.

    If you have any suggestions, I’d love to hear them!

    Thank you!
    Chuck


    chuckm
    Participant

    FYI…looks like something happened to my sandbox so I updated it to show the functionality again. Please let me know if you see the issue.

    Thanks,
    Chuck

    Hi,

    I suggest you use the setcellvaluebyid method.
    Your example is now working. Here is a link for it: https://codesandbox.io/s/grid-doesnt-update-when-filtered-forked-o1ddhp
    You don`t need to save the row data in the component as you can get it from the grid. You only need to save the uid of the row

    If you have any questions, let us know!

    Best regards,
    Svetoslav Borislavov

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


    chuckm
    Participant

    Hello Svetoslav!

    This certainly works for the example I’ve given, and perhaps I should’ve made it more complicated to clearly display the issue further, but what if multiple values on a row are updated on the data related to a row in the grid? Say, a selection in the dropdown causes several values to need updates? I would think it’d be inefficient to call this value repeatedly.

    In reality, I’m using a grid that is much more dynamic, meaning, I don’t know the columns in the grid to utilize for this call (again, it was a simple example to show the issue). The data on the grid (for a single row) is being updated and I’d like to refresh just that row’s worth of data (without the columns being known). I’d rather not refresh the grid in its entirety, just that row.

    Is that possible?

    Thanks again,
    Chuck


    chuckm
    Participant

    Sorry, also, just wondering if this is still considered a bug since it works differently with and without a filter applied? I would assume so.

    Thanks again,
    Chuck


    chuckm
    Participant

    Hello again Svetoslav!

    I’ve tried the .updaterow() function along with a beginupdate/endupdate pairing and this seems to work. I’ll go this route and hope it all works out!

    I do hope you will look at this item and consider it a bug and update to have it working the same with or without a filter.

    Thanks very much for your help.
    Chuck

    Hi,

    Thank you for the update, yes it is a bug and I have opened an issue!
    If you need further assistance, we will be happy to help!

    Best regards,
    Svetoslav Borislavov

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


    chuckm
    Participant

    Thank you!

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

You must be logged in to reply to this topic.