Hi,
I am having issues with the autogeneratecolumns feature of igGrid.
I am given the task of making a generic grid which could render the data of a dynamic datasource provided to it at runtime.
I am using Asp.Net MVC. I have a view named Listing.cshtml which will get an action method and cotroller name in its ViewBag and render the grid with datasourceurl set as the ViewBag.ActionMethod & ViewBag,ControllerName supplied to it.
This means that the grid will be displaying dynamic data and its datasource will change dynamically, because GridDataSource action name will be passed as a parameter.
When I set autogeneratecolumns(true) my grid does not render the rows and instead shows a loading circle animation which keeps on loading. I was just checking to see if my grid would render the columns automatically or not, because if I specify the columns explicitly the grid renders fine. When i set autogeneratecolumns to true, the grid does not display data.
Why is that happening? Please guide me i am stuck here. How can I render the grid dynamically without knowing the columns of the datasource through Asp.Net MVC helper.
Also is this achievable that I have a single .cshtml page for my grid and at runtime the page is supplied with the DataSourceUrl, and after reading it from the ViewBag , The grid loads its datasource at runtime. Is this possible? If it is then what would I provide inside the @(Html.Infragistics().Grid<????>() ??
And would the grid render without specifying the @model directive on top of page because the model will change at runtime.
Please help me out here , and if possible please provide a working sample in which the grid datasource is loaded dynamically and its datasource is set to a string which contains the name of [GridDataSourceAction].
Also why my grid is no displaying data when i set autogeneratecolumns to true and renders fine when I explicitly specify the columns.
Any help would be appreciated.
Hello zeppelin led,
Please feel free to contact me if oyu have any additional questions regarding this matter.
I am glad that you consider my suggestions helpful.
Please feel free to contact me if you have any additional questions regarding this matter.
Thanks alot for your help & time, much appreciated.
I am glad that you resolved the issue with filtering.
What I can suggest for achieving your second requirement is setting a fixed height to the igGrid using its height property. In this scenario if you change the page size of the Paging feature and the total sum of all the row heights exceeds the initially set height of the grid a scrollbar will appear for the grid.
I hope this will help you achieve the look and feel for igGrid that you are looking for.
Please let me know if you have any additional questions regarding this matter.
One last question:
When I increase the grid page size, the grid container expands but I need a vertical scrollbar to appear and dont want the grid to expand itself.
How would i do this, i am using mvc controller's action method to create my gridmodel. How do i add a feature to achieve this.