Is it possible to discard the changes done till now in batch mode programmatically ?

As above question, for example when I press a button.

Federico

1 Reply 1 reply marked as answer

VN Vignesh Natarajan Syncfusion Team March 29, 2021 05:32 AM UTC

Hi Federico,  
 
Thanks for contacting Syncfusion support.  
 
Query: “Is it possible to discard the changes done till now in batch mode programmatically ?” 
 
Yes, we suggest you to achieve your requirement using CloseEdit() method of Grid. Refer the below code example.  
 
<SfButton OnClick="Can" Content="Cancel"></SfButton> 
  
<SfGrid @ref="Grid" DataSource="@Orders" AllowPaging="true" Toolbar="@(new List<string>() { "Add""Delete""Update""Cancel" })" Height="315"> 
</SfGrid> 
  
@code{ 
    public List<Order> Orders { getset; } 
  
    SfGrid<Order> Grid { getset; } 
  
    public async Task Can() 
    { 
       await Grid.CloseEdit(); 
    } 
 
 
Refer our API documentation for your reference 
 
 
Please get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan 


Marked as answer
Loader.
Up arrow icon