1
votes

I use the kendo ui mvc grid.

I set the columns to Editable(false);

I can still edit those fields in the popup editing dialog. Why?

 .Model(model =>
                {
                    model.Id(p => p.Id);
                    model.Field(p => p.FirstName).Editable(false);
                    model.Field(p => p.LastName).Editable(false);                     

                }
             )
1

1 Answers

0
votes

Popups always has to be customized.

In Views > Shared > EditorTemplates > Person (or whatever your class is) you just toss in whatever you want

@model TelerikMvcApp1.Models.Foo.Person
<div>
    @Html.HiddenFor(person => person.Id)

    <div class="editor-label">
        <label for="Title">First Name</label>
    </div>
    <div class="editor-field">
        @Html.Kendo().TextBoxFor(person => person.FirstName)
    </div>
</div>