Is there not a simple way to place the grid in a readonly state?

1 Answer 297 Views
Grid
Jeffrey
Top achievements
Rank 2
Iron
Veteran
Iron
Jeffrey asked on 20 May 2021, 05:20 PM | edited on 20 May 2021, 05:26 PM

Maybe I'm missing something but I'm not seeing an EditMode = @GridEditMode.None or maybe an Editable = False option. 

How can I quickly set my data grid into a readonly mode?

I realize I can add the "disabled" attribute to the containing <div> element but that disables scrolling and paging through the data.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 20 May 2021, 09:58 PM

Hello Jeffrey,

The default edit mode is Inline, so if you have no command buttons, the user won't be able to edit. You can, for example, put them in conditional markup based on your flag.

An alternative is to cancel the OnEdit event based on that flag if you want to keep the buttons.

You can also do both at the same time, depending on the UX you want your users to have.

Regards,
Marin Bratanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Grid
Asked by
Jeffrey
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Marin Bratanov
Telerik team
Share this question
or