I need to create a global grid filter in ASP.NET C# which filters any grids that have the ROLE field.
The user may have multiple ASP.Membership roles, although each grid row only has 1 role. The grids are populated from Views which have a Column called Role (eg Advanced or Introductory). We also have multiple variables in session, although do not want to expose any sensitive information.
If the User is NOT Authenticated they only see demo videos. This is a boolean field in the database.
If the user is authenticated they see row records corresponding to their role. The logic needs to occur on page load or grid render to ensure the user only sees the correct content.
The solution needs to be independent of new roles added. So if a new role is added no extra coding is required, the code just loops through roles for a string match. The solution may be a Class or part of the Base Masterpage.
I have a SQL query that casts all roles into comma seperated values if that is of use.
We are using Telerik Controls, although this should not affect the outcome.