[OutSystems Data Grid] How to undo changes in datagrid on click of cancel button
data-grid-reactive
Reactive icon
Forge component by Platform Maintenance

Hey,

How to undo changes from data grid on click of cancel button, I have tried by refresh data but changes are still there. 

Thanks 

Prajakta

Solution

Hi @Prajakta Roshankhede ,

Try adding JavaScript action with below code on cancel button action

document.location.reload();

Let me know if it helps

Regards,

Swapnil

2020-08-05 09-00-16
Gabriel Lundgren

Hey @Prajakta Roshankhede,

I'm not sure if this is what you desire, but as of now we don't have this as a public client action, however if you use our API you can achieve the desired result.


Please try using the following JS snippet:

let grid = GridAPI.GridManager.GetGridById(gridWidgetID);

let actionCount = grid.features.undoStack._undoStack.actionCount;

for (let i = 0; i < actionCount; i++){

    grid.features.undoStack._undoStack.undo();

}


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.