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

TreeList - Membership & Roles

2 Answers 31 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Franklin
Top achievements
Rank 1
Franklin asked on 17 Jul 2012, 02:55 PM
How can I restrict the access and the manipulation (add, edit, delete) of a TreeList with my membership provider based on roles?
Is this posible or how what can I do?
Thanks in advanced

2 Answers, 1 is accepted

Sort by
0
Franklin
Top achievements
Rank 1
answered on 18 Jul 2012, 01:59 PM
Is possible establish permissions for each row, such that one role just can see the row, another can see and edit, and another cannot see it?

Thanks for your Help.
0
Andrey
Telerik team
answered on 20 Jul 2012, 10:40 AM
Hello,

Out of the box such functionality is not available for RadTreeList. In order to achieve your goal you need to manually allow/restrict the user from viewing the information.

The approach is as follows:

  • You need to hook the ItemDataBound event of RadTreeList
  • In its body you should check what is the currently bound item and then the event argument item to the appropriate type
  • Then based on some condition you should either hide or show the required item.

You could use the following help topics from RadTreeList documentation:

Accessing cells and rows
Edit modes

Additionally, for the condition you could use the:

Membership class
Role class
FormsAuthentication class

All the best,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeList
Asked by
Franklin
Top achievements
Rank 1
Answers by
Franklin
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or