Team
we are facing the issue binding the data into kendo.mvc.UI grid
here is the screenshots
my UI source code:
@(Html.Kendo().Grid<ClientOnboarding.Data.EF_COB_PortalUsr>()
.Name("CompanyDemographGrid")
.Selectable()
.Columns(columns =>
{
columns.Bound(c => c.name).Width(110);
columns.Bound(c => c.email).Width(110);
columns.Command(command =>
{
command.Edit();
command.Destroy();
}).Width(120);
})
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(5)
.Events(events => events.Error("error_handler"))
.Model(model =>
{
model.Id(mdel => mdel.Rec_id);
model.Field(mdel => mdel.Rec_id).Editable(false);
model.Id(mdl => mdl.name);
model.Field(mdl => mdl.name).Editable(false);
model.Id(mdl => mdl.email);
model.Field(mdl => mdl.email).Editable(false);
}
)
.Read(read => read.Action("BindAllDemographPortlUsr", "OnBoarding"))
.Update(update => update.Action("UpdateDemographPortlUsr", "OnBoarding"))
.Create(update => update.Action("AddDemographPortlUsr", "Grid"))
.Destroy(destroy => destroy.Action("DeleteDemographPortlUsr", "OnBoarding"))
)
.ToolBar(toolbar => toolbar.Create())
// Set grid editable.
.Editable(editable => editable.Mode(GridEditMode.InCell))
// Set grid sortable.
.Sortable()
// Set grid selectable.
.Selectable()
// Set grid pagable.
.Pageable(pageable =>
{
pageable.Refresh(true);
pageable.PageSizes(true);
})
)