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

Grid binding error - CS1061: 'Syncfusion.JavaScript.GridPropertiesBuilder<object>' does not contain a definition for 'DataSource'

Thread ID:





123969 May 4,2016 09:10 AM UTC May 6,2016 12:37 PM UTC ASP.NET MVC 3
Tags: Grid
Tom Frajer
Asked On May 4, 2016 09:10 AM UTC

I created new MVC 5 project folowing steps here: http://help.syncfusion.com/aspnetmvc/getting-started#mvc-5-application (except that a choose all the available syncfusion components)
At first I tried "Date Picker demo" and it wos working OK.

Next I tried to follow this guide: http://help.syncfusion.com/aspnetmvc/grid/getting-started#create-your-first-grid-in-mvc
Result was OK - I was able to run it and see grid with header without any records in it. Perfect.

Next step was to add some data binding: http://help.syncfusion.com/aspnetmvc/grid/getting-started#data-binding
I pasted the code, but unfortunately, I got this error: CS1061: 'Syncfusion.JavaScript.GridPropertiesBuilder<object>' does not contain a definition for 'DataSource' and no extension method 'DataSource' accepting a first argument of type 'Syncfusion.JavaScript.GridPropertiesBuilder<object>' could be found (are you missing a using directive or an assembly reference?)

I know this is newbie problem, but Im new to this :)
I tried to find solution on your forum and found this thread: http://www.syncfusion.com/forums/118667/Cannot-DataBind-a-Grid
So I checked .JS references, and it seems I have them all in place:

    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - My ASP.NET Application</title>
   <link rel='nofollow' href="@Url.Content("~/Content/ej/web/Default-theme/ej.widgets.all.min.css")" rel="stylesheet"/>
   <script src="@Url.Content("~/Scripts/jquery-2.1.4.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jsrender.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.easing.1.3.min.js")"></script>   
    <script src="@Url.Content("~/Scripts/ej/ej.web.all.min.js")"></script>
    <script src="@Url.Content("~/Scripts/ej/ej.unobtrusive.min.js")"></script>

My complete index.cshtml is as follows:

    ViewBag.Title = "Home Page";

<br />

        .DataSource(d => d.URL("http://mvc.syncfusion.com/UGService/api/Orders").CrossDomain(true).Offline(true)).Columns(col =>


        col.Field("OrderID").HeaderText("Order ID").TextAlign(TextAlign.Right).Width(75).Add();

        col.Field("CustomerID").HeaderText("Customer ID").Width(80).Add();

        col.Field("ShipName").HeaderText("Ship Name").Width(100).Add();

        col.Field("ShipCity").HeaderText("Ship City").Width(100).Add();




Attachment: Ticking_3f7c33c3.7z

Tom Frajer
Replied On May 4, 2016 01:56 PM UTC

Okay, I found solution to my problem.

.DataSource(d => d.URL("http://mvc.syncfusion.com/UGService/api/Orders").CrossDomain(true).Offline(true)).Columns(col =>

You should check this tutorial as I just copy-pasted it and there is upper case S on DataSource that was causing the error.

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On May 5, 2016 06:16 AM UTC

Hi Tom 

Thanks for contacting Syncfusion Support. We are sorry for the inconvenience. 

We will modify Datasource API of Grid and refresh the following online Getting-started document shortly. 

Seeni Sakthi Kumar S. 

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On May 6, 2016 12:37 PM UTC

Hi Tom, 

We have modified the Datasource API of Grid and refreshed the following online Getting-started document. 

Seeni Sakthi Kumar S. 


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