HI Using asp.net mvc .net (not core). I want to disable columns for edit. Person can read it but cannot overrite it. How I can do that?
1 Answer, 1 is accepted
1
Accepted
Yanislav
Telerik team
answered on 26 Nov 2021, 02:43 PM
Hello Amir,
This is possible when using Inline or InCell editing mode. You can specify a column as a read-only in the Grid DataSource model configuration with the 'Editable(false)' option.
.DataSource(dataSource => dataSource
.Ajax() // or .Server()
.Model(model =>
{
// Declare a model field and make it readonly
model.Field(p => p.UnitPrice).Editable(false);
})
)
It demonstrates how to implement a custom editor and how to configure the Grid to use it.
This way, you'll have full control over which fields to be shown and how to be shown.
Regards,
Yanislav
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.