Context
Canvas app with modern controls (auto-layout containers).
Modern table (OneGrid) bound to an Azure SQL data source (Items points to a SQL view).
Modern form is always visible on the same screen.
On Confirm, I send data to SQL via a stored procedure (triggered from Power Apps through a Power Automate flow / SQL connector).
I do not want to switch to classic Data Table (the app is built with modern containers), and I don’t want to rely on local collections either
Problem
After creating or editing a record and getting a success response from the stored procedure, the modern table does not show the change immediately. It only updates after I perform a second change (e.g., saving again or doing any additional action). In other words, the first refresh seems ignored by OneGrid.
What I’ve already tried (none solved it):
Refresh('csys.VW_Productos')
right after the SP success.
Forcing a re-render by toggling a visibility flag (unmount/mount the grid):
Screen OnVisible
: Set(_GridOn; true)
Table Visible
: _GridOn
After success:
Set(_GridOn; false);;
3. A hidden Timer that does two spaced Refresh()
calls (250ms) and then toggles the table’s visibility.
4. Ensuring I refresh the same data source name the table uses (no duplicated connections).
.Items
expression (to avoid schema remapping issues).;
and ;;
):Refresh()
executes.Questions for the community
Is this a known issue / repaint bug with OneGrid when bound directly to SQL views?
Is there a reliable pattern to force OneGrid to rebind/refresh immediately after a successful write to SQL (without switching to classic Data Table and without using local collections)?
Would binding Items to a base table (instead of a view) make any difference for OneGrid’s refresh behavior?
Any best-practice to finalize a server write (stored proc) and guarantee that OneGrid shows the change on the first refresh?
Thanks in advance for any pointers or workarounds that work in production with modern controls.
ClearCollect(colShadow, 'csys.VW_Productos');
Set(_GridOn, false);
Set(_GridOn, true);