How to disable specific rows base on a condition.

1 Answer 119 Views
Grid
Zeina
Top achievements
Rank 1
Zeina asked on 27 Aug 2022, 04:16 PM

I am using CRUD operations where my grid has default data so, when it is displayed, will have two rows . 

I can add , edit and delete more rows but, I can not edit or delete the default specfic rows that I got: 

USER001 and USER002 can not be edited or deleted. How can I disable those two rows?

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Dimo
Telerik team
answered on 31 Aug 2022, 07:34 AM

Hi Zeina,

Render the Edit and Delete commands conditionally inside the GridCommandColumn.

Another option is to cancel the OnEdit event to prevent editing (e.g. if you are using in-cell editing).

Regards,
Dimo
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/.

Tags
Grid
Asked by
Zeina
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or