Adding Command Buttons dynamically depending on Security

1 posts, 0 answers
  1. John
    John avatar
    6 posts
    Member since:
    Sep 2012

    Posted 13 Nov 2012 Link to this post

    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.


Back to Top