Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
615
AutoGenerateColumns Error
posted

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!

Parents
  • 7499
    Verified Answer
    posted

    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.

Reply Children
No Data