I want to create dynamic grid in ASP .Net MVC using Kendo grid. No of Columns are not fixed. It will get from database based on some conditions.
What will be the correct way to do it?
Also, If any of column has image url, in that case i want to display fixed size image
1 Answer, 1 is accepted
0
Georgi
Telerik team
answered on 07 Feb 2019, 02:46 PM
Hello Meenakshi,
A possible solution is to generate the columns dynamically. In the link below you will find an article which demonstrates how to bind the grid to a DataTable and generate the columns dynamically, also a sample is included:
Furthermore, within the column generation you could check whether the current column is the one containing the url and if it is crate a ClientTemplate which contains an image.
e.g.
foreach (System.Data.DataColumn column in Model.Columns)
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.Learn More.