This question is locked. New answers and comments are not allowed.
Hi All,
Please find my ViewModel code below.
The problem here is that when I press my Edit button and a record flips into the popup, My TechnicalPrice that I want as readonly as this is a calculated column and the ID that is the primary key both become editable. How do I stop these becoming editable in the popup?
Please find my ViewModel code below.
@(Html.Telerik().Grid(Model.Covers) .Name("risksGrid") .Sortable() .DataKeys(keys => keys.Add(r => r.Id)) .DataBinding(dataBinding => { dataBinding.Ajax() .Update("_SaveAjaxEditing", "Grid"); }) .Columns(columns => { columns.Command(command => { command.Edit(); }); columns.Bound(r => r.Name).Title("Cover"); columns.Bound(r => r.SumInsured); columns.Bound(r => r.Rate); columns.Bound(r => r.Excess); columns.Bound(r => r.IncreasedXSDiscount); columns.Bound(r => r.UseDiscount); columns.Bound(r => r.TechnicalPrice).ReadOnly(); }) .Editable(editing => editing.Mode(GridEditMode.PopUp)) .RowAction(row => { if (row.IsAlternate) { row.HtmlAttributes["style"] = "background:aliceblue;"; } }) )The problem here is that when I press my Edit button and a record flips into the popup, My TechnicalPrice that I want as readonly as this is a calculated column and the ID that is the primary key both become editable. How do I stop these becoming editable in the popup?