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
close icon

Editing and saving like Excel

Hello

I am using the grid for editing like Excel in EditMode = Batch.
My Toolbar needs only "update", "cancel" and "search".
If i click my first checkbox, the update icon is still disabled and i can not save.
Only a further mouse click activates the save icon.

Actually, I only need the activated update icon to be able to save at any time.
Is there a way to activate the update icon directly when loading the grid and always save it immediately?

Could you provide me to solve this problem?


3 Replies

VN Vignesh Natarajan Syncfusion Team January 25, 2019 09:27 AM UTC

Hi Christian, 
 
Thanks for contacting Syncfusion support. We are happy to assist you. 
 
Query: Is there a way to activate the update icon directly when loading the grid and always save it immediately? 
 
Be default in batch edit mode, the editing action is works based on the cell. So, the save icon will enable only when the cell focus is out. In order to achieve your requirement we have enabled the save icon using the actionComplete event of ejGrid. Refer the below code, 
 
 
<div id="Grid"></div> 
 
   <ej:Grid ID="FlatGrid" runat="server" AllowPaging="true"> 
       <ClientSideEvents  ActionComplete="actionComplete" /> 
           <EditSettings AllowEditing="true" AllowAdding="true" AllowDeleting="true" EditMode="Batch"></EditSettings> 
           <ToolbarSettings ShowToolbar="true" ToolbarItems=" update,cancel,search"></ToolbarSettings> 
           <Columns> 
                <ej:Column Field="Verified"  HeaderText="check" EditType="BooleanEdit" Width="50"/> 
                <ej:Column Field="OrderID" IsPrimaryKey="true"/> 
                <ej:Column Field="CustomerID" /> 
                <ej:Column Field="EmployeeID"/> 
                <ej:Column Field="ShipCity"/> 
                <ej:Column Field="ShipCountry"/> 
           </Columns>  
           </ej:Grid> 
 
    <script> 
        function actionComplete(args) { 
                //Gets the ToolBar. 
                var $toolbar = $("#" + this._id + "_toolbarItems"); 
                //Gets the update tool. 
                var li = $("#" + this._id + "_update"); 
                //  enable the update tool. 
                $toolbar.ejToolbar("enable" + "Item", li); 
             
        } 
 
        </script> 
 
 
 
For your convenience we have prepared a sample which can be downloaded from below link 
 
 
If we misunderstood your query, get back to us with more details regarding your requirement. 
 
Regards, 
Vignesh Natarajan. 
 



CH Christian Haas January 25, 2019 10:43 AM UTC

Great, it works. :-)
Thank you and best regards

Christian


VN Vignesh Natarajan Syncfusion Team January 28, 2019 04:16 AM UTC

Hi Christian, 

Thanks for the update. 

We are glad to hear that your query has been resolved by our solution. 

Please get back to us if you need further assistance. 

Regards, 
Vignesh Natarajan 


Loader.
Live Chat Icon For mobile
Up arrow icon