We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

how to fire event(save) from outside main htmlbutton to syncfusion save button

Hi, 

I'm using bulk batch edit functionality of the grid.
as attached screenshot, I'd like to fire event(save) of the syncfusion grid from outside main html button.

Is it possible?

Please give me a response.
Thank you.
Kind Regards,


Attachment: main_save_button_wants_to_trigger_syncfusion_savebtn_6fb311a4.zip

1 Reply

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team July 20, 2017 09:38 AM UTC

Hi Dongil,  
 
Thanks for contacting Syncfusion Support.  
 
We could see you would like to save the Grid records from the external action. This can be achieved by using the batchSave method of the Grid. Refer to the following code example and API Reference.  
 
<input type="button" value="Save" onclick="SaveHandler()" /> 
 
@(Html.EJ().Grid<object>("FlatGrid") 
                    .EditSettings(edit => 
                    { 
                        edit.AllowAdding() 
                            .AllowDeleting() 
                            .AllowEditing() 
                            .EditMode(EditMode.Batch); 
                    }) 
 
) 
 
<script type="text/javascript"> 
    function SaveHandler() { 
        var obj = $("#FlatGrid").ejGrid("instance") 
        obj.batchSave() 
    } 
</script> 
 
 
Events related to the Batch Editing mode.  
 
 
Regards,  
Seeni Sakthi Kumar S. 


Loader.
Live Chat Icon For mobile
Up arrow icon