Hi, I am using RadControls for ASP.NET AJAX Q2 2012 SP1. I am developing an asp.net web page that using RadGrid. I use Entity Framework to get the data from the database. I have 2 entities and the relationship between them is many to many , the below code is for example :
An user can have many roles and a role can have many users. Then I have a RadGrid that binds a list of User entity to it, I want to filter the RoleName property , for example I want to filter users that have the "Administrator" role name, how can I achieve this ? What I have to to put in "DataField" attribute of that column ? I searched a lot on google and I haven't found any solution for filtering navigation property with ICollection datatype. Please help me
Thank you very much !
Best regards.
public
class
User
{
public
System.Guid UserId {
get
;
set
; }
public
string
UserName {
get
;
set
; }
public
virtual
ICollection<Role> Roles {
get
;
set
; }
}
public
class
Role
{
public
System.Guid RoleId {
get
;
set
; }
public
string
RoleName {
get
;
set
; }
public
virtual
ICollection<User> Users {
get
;
set
; }
}
An user can have many roles and a role can have many users. Then I have a RadGrid that binds a list of User entity to it, I want to filter the RoleName property , for example I want to filter users that have the "Administrator" role name, how can I achieve this ? What I have to to put in "DataField" attribute of that column ? I searched a lot on google and I haven't found any solution for filtering navigation property with ICollection datatype. Please help me
Thank you very much !
Best regards.