I got a simple question related to Outsystems Datagrid
Q: If the data grid has only one event i.e. Initialize, there must be a way to re-initialize. What could that be? Tried binding it to a variable inside of a block (with a input variable for data source) hoping it to reinitialize as the input variable changes but that too failed :(
Scenario: All the community examples talk about data updates to the grid row/column/cell etc. where the shape of the backing data structure hasn't changed
I'm dealing with a scenario where the backing data structure itself is dynamic and hence I cannot have manual column definitions and have to rely on the auto columns. However, the grid doesnt refresh the underlying data structure changes till I do a hard refresh of the page, post which it does
Hi,
In your use case, with the DataSource schema change, you will have to invoke the Grid refresh method as mentioned below.
Code Snippet:
GridAPI.GridManager.GetGridById($parameters.GridWidgetId).provider._items.refresh();
Demo Screen: DG_RefreshDataSource
Refer to the attached oml.
I hope this helps you!
Kind regards,
Benjith Sam
Appreciate your help @Benjith Sam worked like a gem!
You're welcome.
Glad to help :)
@Daniël Kuhlmann any comments much appreciated :)