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

Get edited row - event

Hi - Mabey I should just stick with backend, because I cant seem to figure out what event fires when working with grids. 
I have implemented your example on Inline Editing, from the Blazor demos, and want to call a method when a edit ends by leaving the row, or button "update" press. 

For us frontend newbies there a not many examples on events in your democode.. 

My goal is to get the new fields values form row, to save in DB.

/Soren  

3 Replies

RS Renjith Singh Rajendran Syncfusion Team January 27, 2020 06:40 AM UTC

Hi Soren, 

Thanks for contacting Syncfusion support. 

We will be triggering two events(OnActionBegin, OnActionComplete) when performing CRUD operations in Grid. Based on your requirement, we suggest you to bind the OnActionBegin event to Grid. You can fetch the current edited row data in the “args.Data” of this event’s handler. 

Please use the code below, 

 
<EjsGrid DataSource="@Orders"> 
   <GridEvents OnActionBegin="OnActionBegin" TValue="Order"></GridEvents> 
    ... 
</EjsGrid> 
 
@code{ 
    ... 
   public void OnActionBegin(ActionEventArgs<Order> args) 
    { 
        if(args.RequestType.ToString() == "Save") 
        { 
            // Here you can fetch the current edited data using "args.Data" 
        } 
    } 
} 


Please refer the screenshot below, 

 

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



SM Soren M May 1, 2020 02:40 PM UTC

Hi - this worked fine until I upgrated, from 17.4.0.55,  to 18.1.0.45, now I dont get the ActionEventArgs for RequestType == "Save".
What have changes? 


RS Renjith Singh Rajendran Syncfusion Team May 4, 2020 08:35 AM UTC

Hi Soren, 

Thanks for your update. 

We suggest you to ensure to modify your sample based on the below breaking changes. Please refer the breaking changes from the release notes, 

We tried to reproduce the reported problem by creating a sample with 18.1.0.45 version. But we are not able to face the reported problem from our side. We are attaching the sample which we have tried from our side for your reference. Please download the sample form the link below, 
 
Please refer the screenshot from the link below, 

 

And if you are still facing difficulties, then kindly get back to us with the following details for better assistance. 

  1. Share the sample which you have tried from your side.
  2. Or reproduce the problem with the attached sample and share with us for further analysis.
  3. Share the exact scenario you are facing the problem.
  4. Share a video demo explaining the problem you are facing.

The provided information will help us analyze the problem, and provide you a solution as early as possible. 

Regards, 
Renjith Singh Rajendran 


Loader.
Live Chat Icon For mobile
Up arrow icon