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
SIGN IN To post a reply.
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.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
AC Armando Costa
- Oct 20, 2019 01:45 AM UTC
- Oct 23, 2019 03:47 AM UTC