Posted 24 May 2024, 2:04 pm EST
I have a custom class that inherits from RestCollectionView which I use as a FlexGrid data source in React. When the page loads, the grid successfully uses my custom CollectionView class to query my API endpoint and retrieve data & refresh its layout to show the returned items.
Outside of this grid, in a separate modal popup, the user can create new items in the database. When the new items are created in the API, I need to tell my FlexGrid to reload its data source and refresh so that the user can see their newly created items in the grid.
I have tried calling the refresh method of the collection view, which does nothing. I have tried calling the refresh and invalidate methods of a FlexGrid ref and they also do not reload the data source.
I need to be able to programmatically call a method of either my flex grid instance or its data source in order for the grid to re-query my remote API using my custom CollectionView & then, after the data is returned, refresh the layout so the new items become visible.
Please help.