Saving Edits When Searching

I have a Blazor Sfgrid with a search field.  The issue I am having is saving the row when I'm working between searching with the following procedure.

1) Search for an item "000"
2) Double click on the row and edit it
3) Without doing anything else like pressing enter or clicking update I search for something new "001"
4) Double click on the new row and edit it
5) Clear my search, but item "000" has reverted back.  


In this case my ActionBeginHandler is not going until I do my search and args.data is null when it does.  

What I want to do:

1) Search for an item "000"
2) Double click on the row and edit it
3) Without doing anything else like pressing enter or clicking update I search for something new "001"
3a) Save changed items for "000" without the user needing to do anything by calling a method
4) Double click on the new row and edit it
5) Clear my search and have items "000" and "001" reflect the edits. 

2 Replies 1 reply marked as answer

AS Andrew Simpson January 12, 2021 10:43 PM UTC

I found a solution in the following way:

1) Added GridEvents OnToolbarClick


2) When it is called I use the EndEdit function from the grid

3) To deal with a non-click of entering the search like that of highlighting the text I added a "Searching" case to the OnActionBegin event handler that also calls the EndEdit 


It now is working as I need.  


Marked as answer

VN Vignesh Natarajan Syncfusion Team January 13, 2021 04:20 AM UTC

Hi Andrew,  
 
Greetings from Syncfusion support.  
 
We are glad to hear that you have resolved your query on your own. 
 
Please get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan  


Loader.
Up arrow icon