jQuery UI Widgets Forums Grid Tell the grid backing data has changed client side

This topic contains 4 replies, has 2 voices, and was last updated by  ajcs 4 years, 10 months ago.

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

  • ajcs
    Participant

    How do I tell the grid that the data that is bound to it has changed on the client side.

    I have done an example here that changes just one field in an array of objects and needs to tell the grid it has changed:

    Example


    admin
    Keymaster

    Hi ajcs,

    The Grid has setCellValue, updaterow methods for updating data. You can also change all data at once if necessary by setting the source property to new dataAdapter instance.

    Regards,
    Peter


    ajcs
    Participant

    I am trying setCellValue but I am seeing different behaviours.

    In the following example it sets the cell value but that does not call the property setter on the backing record:
    Example

    On my machine when testing it is calling the property setter on the backing record.

    What situation makes it call the record property setter when you set the cell value?

    Actually on my machine it calls the setter twice but if I sort the grid then it only calls the setter once.

    Really the setter does not need calling because the backing record has already been set first and I am trying to set the cell value to the same value.

    So these different behaviours are confusing me and causing re-entrant code.

    I am guessing when the grid is sorted there is some sort of object cloning and property scraping going on inside the grid because I don’t think my record class instances are the same maybe when sorted.

    Please explain, thank you


    ajcs
    Participant

    Is there any answer on this please? I need to understand the grid cells contents relationship with the setter on the backing record. Why sometimes it is not called and why sometimes it is called twice or once if you have sorted the grid.


    ajcs
    Participant

    On my machine if the backing record is altered I have to call setCellValue to make it display the changes.

    But if the grid has been sorted calling setCellValue is ignored and the grid always displays the old value. This is the main problem.

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

You must be logged in to reply to this topic.