This is a migrated thread and some comments may be shown as answers.

Conditional .Editable based upon Role

2 Answers 302 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 15 Jan 2019, 01:24 AM

Hello,

What is the best way to handle a grid that can be edited by one role and read only by another?

Thanks

John

2 Answers, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 15 Jan 2019, 12:06 PM
Hello John,

The Editable setting for the Grid has Enabled property. You can set that property based on the user role and thus, editing for some users will be disabled.

.Editable(editable => editable.Enabled((bool)ViewData["isAdmin"]).Mode(GridEditMode.InCell))


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
John
Top achievements
Rank 1
answered on 15 Jan 2019, 12:46 PM
Thanks!
Tags
Grid
Asked by
John
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
John
Top achievements
Rank 1
Share this question
or