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

Grid rending data error

Hi there,

when I try to rending data in grid it always got following error:
"0x800a138f - JavaScript runtime error: Unable to get property 'helpers' of undefined or null reference"

In controller:

public IActionResult Index()
            List<JobViewModel> JobList = new List<JobViewModel>();          
            foreach (Tickets t in tickets)
                JobViewModel tmp = new JobViewModel
                    JobNumber = t.JobNumber,
                    JobStatus = t.jobStatus,
                    TimeStamp = DateTime.Now,
                    RespondPerson = this.User.GetFirstName() + " " + this.User.GetLastName()                                        
            ViewBag.datasource = JobList;
            return View();

In View:

<ej-grid id="FlatGrid" allow-sorting="true" allow-paging="true">
    <e-datamanager json="(IEnumerable<object>)ViewBag.datasource" allow-paging="true"></e-datamanager>
    <e-toolbar-settings show-toolbar="true" toolbar-items='new List<string>() {"search"}'></e-toolbar-settings>
        <e-column field="JobNumber" header-text="Job Number" width="75"></e-column>
        <e-column field="JobStatus" header-text="Status" width="80"></e-column>
        <e-column field="TimeStamp" header-text="Last Modify Time" width="75"></e-column>
        <e-column field="RespondPerson" header-text="Respond Person" width="75"></e-column>       
        <e-column header-text="Action" template="<a rel='nofollow' href='#'>Update</a>>"></e-column>

I think I am bit lost in the datasource of grid.
I tried with
"<e-datamanager datasource="ViewBag.datasource" allow-paging="true"></e-datamanager>"
as well, but same result.

Please advise.


2 Replies

VA Venkatesh Ayothi Raman Syncfusion Team February 13, 2017 10:47 AM UTC

Hi Vincent, 
Thanks for contacting Syncfusion support. 
This issue happened when we missed to refer the JS render script reference file in Application. Also ensure whether you are referring the JS render script file in _Layout.cshtml page like as follows,  
Code example: 
@_Layout.cshtml page  
. . .  
<div class="container body-content">  
        <environment names="Development">  
            <script src="~/lib/jquery/dist/jquery.js"></script>  
            <script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>  
            <link rel='nofollow' href="~/lib/syncfusion-javascript/Content/ej/web/flat-lime/ej.web.all.min.css" rel="stylesheet" />  
            <script src="~/js/site.js" asp-append-version="true"></script>  
            <script src="~/lib/jquery.easing/js/jquery.easing.min.js"></script>  
            <script src="~/lib/jsrender/jsrender.js"></script>  
            <script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>  
            <script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>      
            <script src="~/lib/syncfusion-javascript/Scripts/ej/web/ej.web.all.min.js"></script>  
        <hr />  
            <p>&copy; 2016 - WebApplication8</p>  
    <environment names="Staging,Production">  
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"  
                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">  
        <script src="~/js/site.min.js" asp-append-version="true"></script>  
    @RenderSection("scripts", required: false)  
Please refer to the Help documentation for more information, 
We have also created a sample for your convenience which can be download from following link,  

Venkatesh Ayothiraman. 

VA Venkatesh Ayothi Raman Syncfusion Team February 13, 2017 11:21 AM UTC

Hi Vincent, 
Sorry for the inconvenience caused. 
We have missed to update the sample in previous response. Please find the sample link below, 
Venkatesh Ayothiraman. 

Live Chat Icon For mobile
Up arrow icon