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

TypeError: this.model.currentViewData is undefined (In Implimentation of Hierarchical Grid --> Child Grid)

Thread ID:





132591 Sep 11,2017 08:59 AM UTC Sep 14,2017 04:52 AM UTC ASP.NET MVC 3
Tags: Grid
Saud Nasir
Asked On September 11, 2017 08:59 AM UTC

I am implementing a Hierarchy Grid in ASP.Net MVC using syncfusion Grid Control. I am following the example of this article. 
I am fetching the data from server side with an ajax call on the expansion of child grid. When i try to expand child grid, the ajax call fetches the data in JSON format and a JavaScript error (TypeError: this.model.currentViewData is undefined) occurs and data in the child grid doesn't load into child grid. I have attached sample project with this query. The URL for accessing the required page is (http://localhost:50364/Grid/GridFeatures). *Port Number after localhost will be different on your machine.

Any help is appriciated

Saud :)

Attachment: SynFusionPractice_661232df.zip

Mani Sankar Durai [Syncfusion]
Replied On September 12, 2017 12:59 PM UTC

Hi Saud, 

Thanks for contacting Syncfusion support. 

We have checked the sample and we are able to reproduce the reported issue. From the sample provided we found that you have returned the result alone from server side instead of passing it as result and count pair. When using UrlAdaptor it is must to return the data as result and count pair.  So that it will bind the data to the grid.  
Refer the code example 
public JsonResult GetChildData(int _empID) 
            var ChildDaqtaSource = ChildData(_empID); 
            var count = ChildDaqtaSource.Count; 
            return Json(new { result = ChildDaqtaSource, count = count });  //pass it as result and count pair 

We have also modified a sample that can be downloaded from the below link. 
Refer the documentation link of UrlAdaptor 

Please let us know if you need further assistance. 

Manisankar Durai. 

Saud Nasir
Replied On September 13, 2017 04:39 AM UTC

Hi Mani,

Solution worked. Thanx :)

Mani Sankar Durai [Syncfusion]
Replied On September 14, 2017 04:52 AM UTC

Hi Saud, 

We are happy to hear that your problem has been solved.  

Please let us know if you need further assistance. 

Manisankar Durai. 


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