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

[Solved] Grid based on Asp.net roles

1 Answer 13 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Frank
Top achievements
Rank 1
Frank asked on 18 Jul 2011, 01:23 PM
Hi, to all,

I have a question. Is it possible to enable / disable / or visible / hide columns based on asp.net membership provider roles ?


For example I want to show all columns of a table if the user is in Administrator role and hide some columns if the user is in
another role. 


Regards

Thorsten

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 18 Jul 2011, 03:08 PM
Hello Frank,

You can use the Visible() setting of the column:

columns.Bound(c => c.ID).Visible((bool)ViewData["IsAdmin"]);

Regards,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Grid
Asked by
Frank
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or