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

Adding Command Buttons dynamically depending on Security

0 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 13 Nov 2012, 08:46 AM
I have a Kendo Grid using Server binding and defined in a Razor view like @(Html.Kendo().Grid etc...

I'm using inline editing and it works find however I'd like to only show the destroy button if the user belongs to a certain role.

Any ideas about the best way to achieve this ? Ideally I'd like to write some sort of extension method so I could do something like :

    columns.Command(command => { command.Destroy().If(IsInRole("Admin")) };

Any pointers would be very helpful.

Thanks 

John

No answers yet. Maybe you can help?

Tags
Grid
Asked by
John
Top achievements
Rank 1
Share this question
or