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

After a cell update do something

Hi
how can I execute some code after updating a cell in the grid.

I tried using EVENTS
< GridEvents OnActionComplete="OnComplete" OnActionBegin="OnBegin" OnCellSave="CellSavedHandler" TValue="Artigos" > < /GridEvents
but they dont work if I use TAB to change to the next cell

Also using Data ADAPTER
< EjsDataManager AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor" > < /EjsDataManager >
It only gets called if I press ENTER or jump to other row.

Ex:
I'm using a EjsGrid cell where I input a scan code number to lookup fields to fill other cells of this grid, like description and price.


Thank you

3 Replies

VN Vignesh Natarajan Syncfusion Team October 21, 2019 11:33 AM UTC

Hi Armando,  

Greetings from Syncfusion support.  

Query: “how can I execute some code after updating a cell in the grid && but they don’t work if I use TAB to change to the next cell 
 
We understand that you need to perform some action after updating a cell. We suggest you to achieve your requirement using OnCellSave event of EjsGrid. This event will get hit when a cell gets saved and its edit mode needs to be in BatchEdit. Refer the below code example. 

<EjsGrid TValue="Order" ID="Grid" AllowSorting="true" AllowFiltering="true" AllowPaging="true" Toolbar="@(new List<string>() { "Add", "Delete", "Update", "Cancel" })"> 
    <EjsDataManager AdaptorInstance="@typeof(CustomAdaptor)" Adaptor="Adaptors.CustomAdaptor"></EjsDataManager> 
    <GridEvents OnCellSave="OnSaveHandler" TValue="Order"></GridEvents> 
    <GridPageSettings PageSize="8"></GridPageSettings> 
    <GridEditSettings AllowEditing="true" AllowDeleting="true" AllowAdding="true" Mode="@EditMode.Batch"></GridEditSettings> 
.             .            .        .         .             .       .  
</EjsGrid> 
 
@code{ 
    public static List<Order> Orders { get; set; } 
    public void OnSaveHandler(CellSaveArgs<Order> Args) 
    { 
 
    } 

Refer our UG documentation for your reference 



Regards, 
Vignesh Natarajan. 




AC Armando Costa October 22, 2019 09:09 AM UTC

That did it
Thank you


VN Vignesh Natarajan Syncfusion Team October 23, 2019 03:47 AM UTC

Hi Armando,  

Thanks for the update.  

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

Please get back to us if you have further queries.  

Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon