This question is locked. New answers and comments are not allowed.
Hi,
In my scenerio, I have a dataTable which has runtime generated coulmns. I need to bind those columns to grid.
Below is my code, I can see the run time generated columns in header but not the data.
Can you please suggest the way out for it?
Thanks !!!
In my scenerio, I have a dataTable which has runtime generated coulmns. I need to bind those columns to grid.
Below is my code, I can see the run time generated columns in header but not the data.
@{ DataTable dt = new DataTable(); dt = ViewBag.region; }<br /><br /><div> @(Html.Telerik().Grid<System.Data.DataRow>() .Name("Region") .DataKeys(dataKeys => dataKeys.Add(dt.Rows[0].ToString())) .Columns(columns => { columns.Command(commands => commands.Select()).Title("Select"); foreach (System.Data.DataColumn dataColumn in dt.Columns) { columns.Bound(dataColumn.DataType, dataColumn.ColumnName) .ClientTemplate("Data: <#= " + dataColumn.ColumnName + "#>"); } }).Selectable() )Can you please suggest the way out for it?
Thanks !!!