Issue with Grid save

I have a grid control that I have no issues with adding records to, but when I tried to edit rows I get an interesting issue. On some columns if I just deleted the data (blank/null) it doesn't save the blank field (This are just string fields). If I change the data to some other text it saves just fine. When I set up some alerts in action-begin and action-completed. I see that a action-begin with a resultType of Save is issued followed by a action-begin with a resultType of Cancel. There are no errors in the browser. Also the Update in the controller is never called. How can I determine why a Cancel request was issued when I go to save the record?

I've attached the controller, View and Model code.

Thanks,
Mike

Attachment: HaaStracking_6b7743e4.zip

5 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 5, 2018 12:46 PM UTC

Hi Michael, 
 
Thanks for contacting Syncfusion Support. 
 
We have checked your query and we are unable to reproduce your reported problem at our end. When we try to save the record without any modification on the records. In this case, we can get the  “args.requestType” as “cancel which is the default behavior of the Grid. If you are reporting the same problem, we couldn’t resolve this. Apart from this, we have saved the blank value and saved the records as like the given screenshot below. We have prepared  a simple sample which can be downloaded from the below location.  

Please refer to the sample and screenshot:- 

 

If we misunderstood your requirement ,Please share us the following details to find the cause of the issue. 

1. Elaborate your issue. While editing which column you are facing the reported problem? 

2. Graphical Representation of the issue. 

3. In which operation you have faced the issue while Updating or Deleting of records. 

4. Screenshot/Video Demo to replicate the issue. 

5. If possible reproduce the issue in the above sample and revert us back. 

The provided information will be helpful to provide you response as early as possible. 

Regards, 

Farveen sulthana T 




ML Michael Lambert February 5, 2018 06:25 PM UTC

This is a really weird issue.  I've attached three avi to show the problem. I've created Alerts in the Action-begin and action-complete that displays the requestType for debugging.  Testing1.avi first shows that if a just edit a field it saves properly, but if I delete the contents of the field, the request gets cancelled as shown by the Action-cancel alert message.

Testing2.avi show that if a field is blank and I try to save info to it, the Save Action gets cancelled again.  These fields are just varchar (sql) fields.

Testing3.avi shows that if a delete the content as in Testing1.avi, but change another field the record save without issue!!

Some columns have the issue and some do not, it seems like there is no rime or reason to this as most of these are just string fields and it appears that no exceptions occur.  What would cause the Save process from getting cancelled and how can we see why?

Also I have no issue saving data in all fields when adding records.

Mike

Attachment: Testing12_d0f2caff.zip


ML Michael Lambert February 5, 2018 06:26 PM UTC

This is the third avi.  To big to include in previous.

Attachment: Testing3_f24cfd0.zip


ML Michael Lambert February 6, 2018 04:30 AM UTC

So I actually got it working.  I re-imported the data model from the SQL DB and and it appears that things are working.  Looks like there might of been some issue with the data model or context.  I just wished though that it would of thrown some kind of error instead of just cancelling the save transaction.


FS Farveen Sulthana Thameeztheen Basha Syncfusion Team February 6, 2018 04:04 PM UTC

Hi Michael, 
 
When we save the records without any modification, we can get the args.requestType as “cancel” in actionComplete event which is the default behavior in the Grid. We can get args.requestType as save only we can perform any modifications. So we couldn’t consider this requirement as Bug.  
 
Please get back to us if you need any further assistance. 
 
Regards, 
 
Farveen sulthana T 


Loader.
Up arrow icon