OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – HTML, JavaScript, CSS, Design Questions Listen to Datagrid Changes per Datagrid

This topic contains 2 replies, has 2 voices, and was last updated by  Alex Taylor 5 years, 7 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34633

    Alex Taylor
    Participant

    Hi there,

    Is there a way to listen to the changes to a datagrid with reference to its name. I have a page where there are two datagrids which need to work independently of each other and which need javascript to be triggered every time they change, again individually.

    I have included the following code in the datagrid.yml for both datagrids:

    I am however unsure about how to actually callback once any change happens to a datagrid.

    Any help would be appreciated,

    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #34634
    Yevhen Shyshkin
    Yevhen Shyshkin
    Participant

    Hello, Alex.

    Every data update in grid triggers fetch of pageable collection – I believe you can listen to sync event of collection – it triggers every time collection is updated.

    #34635

    Alex Taylor
    Participant

    Thanks mate,

    This worked a treat!

    FYI anyone wanting to do this within the init function of the code i pasted just modify it like so:

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroPlatform – HTML, JavaScript, CSS, Design Questions’ is closed to new topics and replies.

You will be redirected to [title]. Would you like to continue?

Yes No