Hi I need to populate the columns and page size from database. Not from model and hardcoding. I mean everything will be in dynamic. Kindly help me and provide the samples for this. My Existing code below.
@(Html.Kendo().Grid<kendo_grid_with_web_api_and_ondemand.Models.MsgDetails>()
.Name("gridnew")
.Columns(columns =>
{
columns.Bound(o => o.MsgNum).Width(110);
columns.Bound(o => o.MsgDesc).Width(130);
})
.Sortable()
.Scrollable(scrollable => scrollable.Virtual(true))
.Pageable()
.HtmlAttributes(new { style = "height:430px;" })
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(100)
.Read(read => read.Action("MsgDetails_Read", "Home"))
)
)
Columns,Pagesize,Scrollable every property will be in DB. So I need to load populate from db with mvc kendo grid. Kindly help me.