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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grid rending data error

Thread ID:

Created:

Updated:

Platform:

Replies:

128828 Feb 11,2017 04:10 PM UTC Feb 13,2017 11:21 AM UTC ASP.NET Core 2
loading
Tags: Grid
Vincent
Asked On February 11, 2017 04:10 PM UTC

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()                                        
                };
                JobList.Add(tmp);
            }
            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-columns>
        <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>
    </e-columns>
</ej-grid>

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.

Cheers,
Vincent

Venkatesh Ayothi Raman [Syncfusion]
Replied On 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  
<body>  
. . .  
<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>  
  
        </environment>  
        @RenderBody()  
        @(Html.EJ().ScriptManager())  
        <hr />  
        <footer>  
            <p>&copy; 2016 - WebApplication8</p>  
        </footer>  
    </div>  
  
     
    <environment names="Staging,Production">  
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-2.2.0.min.js"  
                asp-fallback-src="~/lib/jquery/dist/jquery.min.js"  
                asp-fallback-test="window.jQuery">  
        </script>  
        <scriptsrc="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js"  
                asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"  
                asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">  
        </script>  
       
        <script src="~/js/site.min.js" asp-append-version="true"></script>  
    </environment>  
  
    @RenderSection("scripts", required: false)  
</body>  
  
 
 
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,  
Sample: 
 

Regards, 
Venkatesh Ayothiraman. 


Venkatesh Ayothi Raman [Syncfusion]
Replied On 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, 
Regards, 
Venkatesh Ayothiraman. 


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.

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

;