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.
Unfortunately, activation email could not send to your email. Please try again.

Connect js Datamanager to mvc api

Thread ID:

Created:

Updated:

Platform:

Replies:

126020 Sep 18,2016 09:18 AM Sep 19,2016 01:13 PM JavaScript 1
loading
Tags: ejDataManager
John Ntovas
Asked On September 18, 2016 09:18 AM

Hello, i have a project and i try to implement a grid with datamanager. The problem is that the code runs correctly on the backend and on the front end but i get an error 500. When i run the bacend on debug mode everything runs ok and i dont see any error, but still returns error 500(internal server error) on the client side.

Backend(it is just mvc asp with added libraries, not syncfusion project):
public DataResult MdlActions(DataManager dm)
        {
            using (Entities db = new Entities())
            {
                IEnumerable data = db.mdlTable.AsQueryable();
                DataOperations operation = new DataOperations();
                int cn = data.AsQueryable().Count();
                data = operation.Execute(data, dm);
                DataResult dt = new DataResult();
                dt.result = data.ToList<mdl>();
                dt.count = cn;
                return data.ToList<mdl>();
            }
        }

FrontEnd (electron app):
function drawGrid() {
debugger;
var dataManger = ej.DataManager({
url: 'http://localhost/api/Mdl/',
adaptor: new ej.UrlAdaptor()
});
var query = ej.Query().take(3);
var execute = dataManger.executeQuery(query) 
.done(function (e) {
debugger;
 //this is just to check if succesfull.
});




Dhivyalakshmi Thirumurugan [Syncfusion]
Replied On September 19, 2016 01:13 PM

Hi John, 

Thanks for contacting Syncfusion support. 

We are unable to reproduce the reported issue at our end. We have prepared the sample for your reference. Please find the sample link below. 

 
Kindly check the above sample and still if you face any difficulties means, then revert us by modifying the above sample or provide your issue reproducible sample and we will happy to help you. 

Please let us know if you have any queries. 

Regards, 
Dhivyalakshmi. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;