Grid editing cancel on the custom button click

Hi,
I need the help, in the grid edit cancel on the custom button click.

When I click the custom button click editing (remove or cancel) on the grid.

Snapshot and code are attached please check

Attachment: grid_editing_remove_on_custom_button_click_ed74e532.zip

5 Replies 1 reply marked as answer

RS Rajapandiyan Settu Syncfusion Team May 3, 2021 11:05 AM UTC

Hi Rizwan, 
 
Thanks for contacting Syncfusion support. 
 
Query: When I click the custom button click editing (remove or cancel) on the grid. 
 
Based on your query, you want to discard (cancel) the edit action in Grid by custom button click. You can achieve your requirement by using closeEdit() method of Grid. Please find the below code example for your reference. 
 
 
 
<script> 
    function btnClick(args) { 
        var grid = document.getElementById("BankStatementsPopupGridView").ej2_instances[0]; 
        grid.closeEdit(); 
    } 
</script> 
 
 
Please get back to us if you need further assistance with this. 
 
Regards, 
Rajapandiyan S 


Marked as answer

RI Rizwan May 4, 2021 06:47 AM UTC

Thank you for the help.
The function is working fine


RS Rajapandiyan Settu Syncfusion Team May 5, 2021 03:44 AM UTC

Hi Rizwan, 
 
We are glad that the provided solution resolved your requirement. 
 
Please get back to us if you need further assistance with this. 
 
Regards, 
Rajapandiyan S 



AS alex sunny July 16, 2021 08:32 AM UTC

thanks for the awesome information.



RS Rajapandiyan Settu Syncfusion Team July 19, 2021 05:33 AM UTC

Hi Alex, 
 
Thanks for contacting Syncfusion support. 
 
We are glad that the provided information was helpful for you. 
 
Regards, 
Rajapandiyan S 


Loader.
Up arrow icon