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();
}