Several fields are configured as not editable and working as designed except for:
- ReportCategoryDesc (Text field)
- IsVisibleInMenu (Boolean)
Any ideas why these 2 are still editable?
Thanks
@( Html.Kendo().Grid<ShelfLife.ViewModels.Telerik.ReportMaintenanceItemVM>()
.Name("client")
.Columns(columns =>
{
columns.Bound(c => c.ReportID).Width(70).Title("ID");
columns.Bound(c => c.ReportTitle);
columns.Bound(c => c.ReportDescription);
columns.Bound(c => c.Categories.ReportCategoryDesc).Filterable(ftb => ftb.Multi(true).Search(true));
columns.Bound(c => c.ReportOrder).Width(100).Title("Order");
columns.Bound(c => c.TRDXFile);
columns.Bound(c => c.IsVisibleInMenu).Width(130).ClientTemplate("<input type='checkbox' #= IsVisibleInMenu ? checked='checked' :'' # />");
columns.Bound(c => c.Active).Width(120).ClientTemplate("<input type='checkbox' #= Active ? checked='checked' :'' # />"); ;
columns.Command(command => command.Destroy()).Width(110);
})
.ToolBar(toolbar =>
{
toolbar.Create();
toolbar.Save();
})
.HtmlAttributes(new { style = "height: 900px;" })
.Editable(editable => editable.Mode(GridEditMode.InCell))
.Filterable()
.Pageable(pageable => pageable.PageSizes(new int[] { 10, 20, 50, 100, 999 }))
.ColumnMenu()
.Groupable()
.Navigatable()
.Sortable()
.Scrollable(scr => scr.Height(900))
.DataSource(dataSource => dataSource
.Ajax()
.Batch(true)
.PageSize(20)
.ServerOperation(false)
.Events(events => events.Error("error_handler"))
//.Model(model => model.Id(p => p.ReportID))
.Model(model => {
model.Id(p => p.ReportID);
model.Field(p => p.ReportID).Editable(false);
model.Field(p => p.ReportCategoryID).Editable(false);
model.Field(p => p.ReportCategoryDesc).Editable(false);
model.Field(p => p.ReportDescription).Editable(false);
model.Field(p => p.ReportOrder).Editable(false);
model.Field(p => p.ReportTitle).Editable(false);
model.Field(p => p.TRDXFile).Editable(false);
model.Field(p => p.IsVisibleInMenu).Editable(false);
})
.Create("Filter_Multi_Editing_Create", "Telerik")
.Read("Filter_Multi_Editing_Read", "Telerik")
.Update("Filter_Multi_Editing_Update", "Telerik")
.Destroy("Filter_Multi_Editing_Destroy", "Telerik")
)
)