Hi I am using MVC5 .Net framework 4.5 with IgniteUI 2014.1, I am using HierarchicalGrid to populate the data in my POC application.
I saw your sample which is using Framework 4.0 and MVC 4 version dlls. It compiles and works fine. I developed looking at it, my application is not populating data, and it is giving me the below error.
Unhandled exception at line 107, column 31482 in http://localhost:33761/igniteui/js/infragistics.lob.js
0x800a139e - JavaScript runtime error: The remote request to fetch data has failed: (error) undefined
I checked the Logs and noticed that is throwing some internal server error "500". Not sure what is wrong. My guess is because of this I am seeing a client side error.
I am using Loadondemand. Your help is much appreciated. Let me know if you need any other details.
Hello,
Would you upload a sample?
Stanimir Todorov
Dear Todorov,
What I understand from the design is:
If I uses igHierarchicalGrid, then the parent class should have the property as
1) public IEnumerable<ChiledObject> ChiledObjectCollection{ get; set; }
2) When I use LoadOnDemand feature, then it should implement mode.GetData() should get IQueryable data.
If the above two points are not followed, then It gives errors. Can you please confirm, if not can you give an good example which is implemented using any other generic collections.
I am waiting for your response.
Dear Raghavendra Dinavahi,
Thanks for using Ignite UI controls.
You may use IEnumberable for enumeration and the model may implement IQueryable for LoadOnDemand instead List.
Please feel free to contact me if you have any additional questions regarding this matter.
Best Regards,
I see something unusual, I started developing developing fresh application again using the example, when I changes the property
public IEnumerable<SessionDocument> Products { get; set; } to
public IEnumerable<SessionDocument> SessionsDocs{ get; set; } I get the above error "at Infragistics.Web.Mvc.GridModel.RenderHierarchicalQueryableRecursive(IQueryable queryable, WrappedGridResponse response, GridModel baseLayout)"
Also in your example in
public class Category { public int ID { get; set; } public string CategoryName { get; set; } public string Description { get; set; } public string ImageUrl { get; set; } public int ProductCount { get; set; } public IEnumerable<Product> Products { get; set; }
}
1) Also public IEnumerable<Product> Products { get; set; } IS THIS MANDATORY If The child grid datasource is Product collection? If so should it be IEnumerable?
2) Also I see for model.DataSource will need to be IQueryable for LoadonDemand feature which will return a JsonResult. Can I not have a List? When I try to
give a List<some object> it give me an error to use implement IQueryable
I am also getting this error when the modle.GetData() is executed.
at Infragistics.Web.Mvc.GridModel.RenderHierarchicalQueryableRecursive(IQueryable queryable, WrappedGridResponse response, GridModel baseLayout)