Hello,
I'm trying to set up a grid in my ASP.NET MVC5 project, and I get this error when the grid is rendered:
Error: You have autoGenerateColumns set to false, but there are no columns defined in the grid. Please set autoGenerateColumns to true, or specify columns manually
However, in my code, I do explicitly set that property to true:
@(Html.Infragistics().Grid(Model.Products.AsQueryable()) .AutoGenerateColumns(true) .Render())
Any ideas about what I could still be doing wrong?
Also, I would really appreciate a link to the best documentation for using the Ignite controls specifically with MVC (and specifically in Razor if possible). Some of the API documentation I find is not related to the MVC Helper, and I want to try to avoid any confusion.
Thank you!
Hello Kylemilner,
Thank you for posting to Infragistics Developer Support.
As stated in this forum thread http://es.infragistics.com/community/forums/t/59028.aspx
“The error you are getting, I suspect this could be due to the fact that you don't have any columns defined (which is ok as long as AutoGenerateColumns is true), but at the same time if your data source doesn't have any entries, there is no way for the grid to autogenerate the columns, because it doesn't have a single data object to analyze for properties, data types, etc”
The Documentation for IgniteUI ican be found here
http://help.infragistics.com/Doc/jQuery/2013.1/CLR4.0?page=igGrid_Overview.html
Please let me know if you have any further questions regarding this matter.
That helps me out - thanks, Prabha. I was trying to learn the grid by starting with the bare minimum number of calls, and I think I took that line of thinking a little too far.