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. Image for the cookie policy date

Can't get grid to show data

I'm making my first foray into asp.net core. I've put together a sample application that closely mimics my actual application's setup.

When I try to view the /Foos page, I get an exception in the syncfusion javascript file:

http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js
line: 10
column: 2960332
message: n.views is undefined
stack: ".addInitTemplate@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:2960332._initGridRender@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:2954825._initDataSource/<@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:2934612t.proxy/<@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:25842jQuery.Callbacks/fire@http://localhost:9390/lib/jquery/dist/jquery.js:3182:11jQuery.Callbacks/self.fireWith@http://localhost:9390/lib/jquery/dist/jquery.js:3312:7t.DataManager.prototype._makeRequest/l<@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:33437t.DataManager.prototype._makeRequest/v<@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:34053w/<@http://localhost:9390/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js:10:92779jQuery.Callbacks/fire@http://localhost:9390/lib/jquery/dist/jquery.js:3182:11jQuery.Callbacks/self.fireWith@http://localhost:9390/lib/jquery/dist/jquery.js:3312:7done@http://localhost:9390/lib/jquery/dist/jquery.js:8754:5.send/callback/<@http://localhost:9390/lib/jquery/dist/jquery.js:9120:9"

Attachment: WebApplication11_764dc59f.zip

6 Replies

JK Jayaprakash Kamaraj Syncfusion Team December 21, 2016 12:50 PM UTC

Hi Brian, 

Thank you for contacting Syncfusion support. 

We have analyzed your attached sample and found that you have missed to mention adaptor in your sample. So, we suggest you to mention adaptor as UrlAdaptor in your sample. In Grid, we have many adaptors to perform crud operations . Refer to the below document for information about adaptors. 


  <e-datamanager url="/Foos/DataSource" 
                 insert-url="/Foos/Insert" 
                 remove-url="/Foos/Remove" 
                 update-url="/Foos/Update" adaptor="UrlAdaptor"> 
  </e-datamanager> 

Regards, 

Jayaprakash K. 



RB R Brian Lindahl December 21, 2016 04:12 PM UTC

Thank you! I'll put that in and give it a try. I couldn't find any documentation on how to specify the adaptor type.


RB R Brian Lindahl December 21, 2016 04:18 PM UTC

Unfortunately, that didn't help. Still seeing the same exception in javascript when the page is loading.


JK Jayaprakash Kamaraj Syncfusion Team December 22, 2016 01:32 PM UTC

Hi Brian, 
 
We have analyzed your sample and found that you have referred jsrender.min.js file with wrong path. The jsrender.js file is used to render the templates. Please refer to the below code example and modified sample. 
 
<environment names="Development"> 
        <script src="~/lib/jquery/dist/jquery.js"></script> 
        <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script> 
        <script src="~/js/site.js" asp-append-version="true"></script> 
        @*<script src="~/lib/syncfusion-javascript/Scripts/jsrender.min.js"></script> // Wrong path *@ 
        <script src="~/lib/jsrender/jsrender.min.js"></script> // Correct path 
        <script src="~/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js"></script> 
    </environment> 


 
Regards, 
 
Jayaprakash K. 



RB R Brian Lindahl December 22, 2016 08:51 PM UTC

Thanks. I figured it was something stupid.


JK Jayaprakash Kamaraj Syncfusion Team December 23, 2016 06:28 AM UTC

Hi Brian,  
 
We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.   
 
Regards,  
 
Jayaprakash K. 


Loader.
Live Chat Icon For mobile
Up arrow icon