View data returned to controller all fields null

Hi I am using Asp.net MVC 5 application in VS2017

I am using MySq.Data .Data.Entity and .Web version 6.9.9 (cannot use latest version does not work)

I am using Ado.Net Entity Data module to create classes from a MySql database that I have.

I am using Entity Framework 6.2.0 (latest)

In the grid when I try and Update or Add new record, the data that is returned to controller has nulls (json issue I think)

This problem is driving me nuts (I have a large number of tables in MySql that I need tio use in Entity Framework)

Thanks

Edmund Herbert





11 Replies

SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team December 4, 2017 12:57 PM UTC

Hi Edmund,  
 
Thanks for contacting Syncfusion Support.  
 
Before proceeding with the problem, we would like to collect some information from you. Please provide the following details to analyze the problem at our end.  
 
  1. Complete code example of the Grid and code behind
  2. Version of the Essential studio
  3. Sample data bound to the Grid
  4. Master page and web.config of your application
 
Regards,  
Seeni Sakthi Kumar S. 



EH Edmund Herbert December 5, 2017 05:01 AM UTC

Just follow up I created data context that uses MSSQL database and the grid works fine in same application as MySql that does not bind to controller update functions

I suggest you create MySql Database and import into Asp.Net MVC 5 application .net 6.2  and latest version of Syncfusion  MVC framework
create grid and use CRUD functions to test.

I cannot send application as we are using a live database

See attached files as requested.






Attachment: halomember_30771151.zip


EH Edmund Herbert December 5, 2017 05:09 AM UTC

Hi I added zip files to Test.zip

Please ignore previous zip

Regards

Edmund Herbert



Attachment: Test_55726470.zip


EH Edmund Herbert December 5, 2017 07:08 AM UTC

Further investigation see below:

Regards

Edmund Herbert



Attachment: Test_1cf79d46.zip


SS Seeni Sakthi Kumar Seeni Raj Syncfusion Team December 6, 2017 12:52 PM UTC

Hi Edmund,  
 
We are unable to reproduce the problem at our end with the provided code example. We have prepared a sample that can be downloaded from the following location.  
 
 
Please share the video demo of the issue. 
 
Regards,  
Seeni Sakthi Kumar S. 
 
 



EH Edmund Herbert December 7, 2017 04:30 AM UTC

Hi the example you sent me does not emulate my problem:

PLEASE LOOK AT MY PREVIOUS POST:

I am using Asp.net MVC 5 application in VS2017

I am using MySq.Data .Data.Entity and .Web version 6.9.9 (cannot use latest version does not work)

I am using Ado.Net Entity Data module to create classes from a MySql database that I have.

I am using Entity Framework 6.2.0 (latest)

In the grid when I try and Update or Add new record, the data that is returned to controller has nulls (json issue I think)

This problem is driving me nuts (I have a large number of tables in MySql that I need tio use in Entity Framework)

Please do not supply example with MSSQL I am using MySQL which does not work

You need to create a MsQl database and import into application using from database to code first.

I can get a MSSQL Database to work but not a MSQL database using entity framework

Regards

Edmund Herbert





EH Edmund Herbert December 11, 2017 01:52 PM UTC

Hi any news on my issue


PK Paul Kocher December 12, 2017 11:01 AM UTC

I actually have the same problem I guess.

So this seems like a general issue. Give this a try:

var grid = $('#yourGridID').data('ejGrid');
grid.addRecord({ value: { "Something": "someValue", "Something": "someValue" }, "action": "Insert" });

Wonder if this would work for you. Unfortunately updating is always null here, too.....


PK Prasanna Kumar Viswanathan Syncfusion Team December 12, 2017 04:17 PM UTC

Hi Edmund, 
 
To perform Server-side CRUD operation, we need to use value as a parameter name for each editing functionality. So please ensure that you have used value as parameter name for the CRUD urls in the controller side. 
 
Refer the below code example. 
 
Please refer the following code snippet and screenshot: 

 
Controller  

public ActionResult NormalInsert(EditableOrder value) 
        { 
            OrderRepository.Add(value); 
            var data = OrderRepository.GetAllRecords(); 
            return Json(data, JsonRequestBehavior.AllowGet); 
        } 


Regards, 
Prasanna Kumar N.S.V 
 



EH Edmund Herbert December 12, 2017 06:41 PM UTC

Thank you that fixed issue you are a star


PK Prasanna Kumar Viswanathan Syncfusion Team December 13, 2017 10:33 AM UTC

Hi Edmund, 
We are happy to hear that your issue has been resolved. 
Please get back to us if you need any further assistance. 
Regards, 
Prasanna Kumar N.S.V 


Loader.
Up arrow icon