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 control not showing any data when UnobtrusiveJavaScriptEnabled is set to true

I have set UnobtrusiveJavaScriptEnabled to true in my web config and referenced the ej.unobtrusive.min.js file in my _Layout.cshtml but my grid wont show any data, it is only showing the table header.If i use the ScriptManager in my _Layout.cshtml and set UnobtrusiveJavaScriptEnabled to false everything works fine.My project functionality requires that i set UnobtrusiveJavaScriptEnabled to true.

  @Scripts.Render("~/bundles/jquery")
   @Scripts.Render("~/bundles/jqueryval")
   @Scripts.Render("~/bundles/bootstrap") 
   @Scripts.Render("~/Scripts/jsrender.min.js")
   @Scripts.Render("~/Scripts/ej/web/ej.web.all.min.js")
   @Scripts.Render("~/Scripts/ej/common/ej.unobtrusive.min.js")
  


 <appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
    <add key="webpages:Enabled" value="false" />
    <add key="ClientValidationEnabled" value="true" />
    <add key="UnobtrusiveJavaScriptEnabled" value="true" />
  appSettings>




5 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team March 1, 2017 04:52 PM UTC

Hi Chaita, 

Thanks for contacting Syncfusion support. 

Query: Enabling UnobtrusiveJavaScriptEnabled in web.config file but grid content is not rendered. 
 
We have analyzed your query and we are not able to reproduce the reported issue in our end.  
 
Refer the help documentation for the setting unobtrusive to ASP.NET MVC application with Syncfusion controls. 
 
 
If you still face the same issue then provide the following details for better assistance. 
 
1.       If see any script error occur in the console window in developer tool then share the stack trace of the issue. 
2.       If you have enable any templates in your sample. 
3.       Share video demonstration or screen shot of an issue. 
4.       If possible please share sample or replicate the issue in the attached sample. 
5.       Clear replication procedure. 
6.       Essential studio version details. 
 
We have prepared a sample and it can downloadable from the below location. 
 
 
Regards, 
Thavasianand S. 



CH chaita March 2, 2017 11:13 AM UTC

My developer tool console window is throwing the error below:

jQuery.Deferred exception: this.model.currentViewData is undefined ._renderGridContent@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:2981050
.render@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:2971512
._initGridRender@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:2960991
._checkDataBinding@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:2925861
._init@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:2920894
t.widget/h<@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:20846
t.widget/n.fn[f]@http://localhost:14407/Scripts/ej/web/ej.web.all.min.js:10:22108
initControls@http://localhost:14407/Scripts/ej/common/ej.unobtrusive.min.js:10:3009
checkUnobtrusive@http://localhost:14407/Scripts/ej/common/ej.unobtrusive.min.js:10:3247
wd.init@http://localhost:14407/Scripts/ej/common/ej.unobtrusive.min.js:10:3489
@http://localhost:14407/Scripts/ej/common/ej.unobtrusive.min.js:10:4218
resolve/resolve/ undefined  jquery-3.1.1.js:3846:3
Use of getPreventDefault() is deprecated.  Use defaultPrevented instead.  browserLink:37:40278

TypeError: this.model.currentViewData is undefined



TS Thavasianand Sankaranarayanan Syncfusion Team March 3, 2017 04:38 PM UTC

Hi Chaita, 
 
We are unable to process by using of your stack trace for the reported issue. 
 
Please provide the following details for better assistance. 
 
1.     Share the Grid code example. 
2.     If you are enable the adaptors in your sample then please share the server side code also. 
3.     If you retrieving the data through server side then share the screen shot of network tab. 
4.     If possible share the sample or reproduce the issue in the attached sample of previous response.  
 
Regards, 
Thavasianand S. 



CH chaita March 6, 2017 02:31 PM UTC

Creating a completely new project solved my issue.I dont know how that helped.Thanx anyway for your help


TS Thavasianand Sankaranarayanan Syncfusion Team March 7, 2017 04:33 PM UTC

Hi Chaita, 

We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.  

Regards, 
Thavasianand S. 


Loader.
Up arrow icon