I found out that defining "Editable(false)" for a model field doesn't seem to work when I've chosen GridEditMode.PopUp:
@(Html.Kendo().Grid<Pharmacy>()
.Columns(columns => ...)
.Editable(editable => editable.Mode(GridEditMode.PopUp))
.DataSource(dataSource => dataSource
.Ajax()
.Model(model =>
{
model.Id(p => p.Id);
model.Field(p => p.Id).Editable(
false
);
model.Field(p => p.MyReadOnlyField).Editable(
false
);
}))
)
In this case, the "Id" field and the "MyReadOnlyField" field will be shown in the popup as editable - which obviously is not the expected behavior.
Is this done intentional or is it a bug that Model definition doesn't work correctly with PopUp edit mode? Of course I can define a custom template, but that's not what I really want... from my view it's a bug or missing feature.
Thanks in advance,
Dimitrij