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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Binding a grid to the local model.

Thread ID:





127374 Nov 10,2016 04:13 PM UTC Nov 11,2016 10:41 AM UTC ASP.NET Core 3
Tags: Grid
Stuart Northcott
Asked On November 10, 2016 04:13 PM UTC

I'm trying to bind the ASP.NET Core Grid control to the enumerable view model on the page, e.g.

@model IEnumerable<SyncFusionTests.Web.Models.BeneficialOwnerIndexModel>

All the examples appear to be binding to a rest end point, however the documentation states:

You can bind the data to Grid control by either locally or remotely. Assign the remote service URL to e-datamanager property of Grid control to bind remote data using ej.DataManager.

But with no examples on how to bind locally.

How would I achieve this?

I've even tried defining the grid data source as:

<e-datamanager  url="Home/DataSource" offline="true"></e-datamanager>

With the associated method in the controller:

        public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm)
            var DataSource = GetDummyBeneficialOwnersList();
            DataResult result = new DataResult();
            result.result = DataSource.Skip(dm.Skip).Take(dm.Take).ToList();
            result.count = DataSource.Count();
            return Json(result);

But this didn't work either.

Preferably I'd like to be able to attach to the model associated with the page.

Thanks in advance,


Stuart Northcott
Replied On November 11, 2016 10:09 AM UTC

Answered in this (later) thread: https://www.syncfusion.com/forums/127303/syncfusion-javascript-gridpropertiesbuilder-error

Mohammed Farook J [Syncfusion]
Replied On November 11, 2016 10:40 AM UTC

 Hi Stuart 
In ASP.NET Core we need to render grid using Render method. Please refer to the below code example and sample.  
                .Columns(col => 

J Mohammed Farook

Mohammed Farook J [Syncfusion]
Replied On November 11, 2016 10:41 AM UTC

 Hi Stuart 
 thanks for update. 
J.Mohammed Farook 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon