I have some user admin features in the WPF application that I am writing now and would like to make it more intuitive for the end user.
I would like to be able to provide some means for simply editing the list of roles that this user belongs to. Currently, the grid is filled as a result of binding to the List<ApplicationUser>
ApplicationUser is my own class, defined as:
public class ApplicationUser { public Guid? UserId { get; set; } public string GivenName { get; set; } public string Surname { get; set; } public string EmailAddress { get; set; } public string UserPhone { get; set; } public string NtLoginName { get; set; } public List<Role> ApplicationRoles { get; set; } }
As you can see, the roles the user is in are stored in a List<Role> . Role is my own class, defined as:
public class Role { public Guid RoleId; public string RoleName; public string RoleDescription; }
Below the layout represents the current state, when I just get the roles as a list and using the converter they simply display the roles as strings separated by a new row in gridview

However, this is what I would like to achieve in order to facilitate the transition and membership in various groups.

Now that Iβm thinking about this, Iβll probably have to change the definition of the role to include the IsMember property to make flag binding easier, but if anyone has a better way, I also welcome this. I can change the JOIN type in sproc, so I return all roles with a request for a specific user and accordingly populate the IsMember property.
Thank you for your time!
c # wpf wpfdatagrid
noonand
source share