Dear Telerik,
I am currently having problems displaying a ComboBox column in RadGridView. The following is my code:
I am currently having problems displaying a ComboBox column in RadGridView. The following is my code:
GridViewCheckBoxColumn colIsSelected = new GridViewCheckBoxColumn("Select"); |
GridViewLookUpColumn colProjectRoles = new GridViewLookUpColumn("RoleID"); |
colProjectRoles.DropDownStyle = RadDropDownStyle.DropDownList; |
colProjectRoles.DisplayMember = "Name"; |
colProjectRoles.ValueMember = "ID"; |
colProjectRoles.DataSource = General.ProjectRoles; |
rgvUsers.Columns.Add(new GridViewDataColumn("UserID")); |
rgvUsers.Columns.Add(colIsSelected); |
rgvUsers.Columns.Add(colProjectRoles); |
rgvUsers.Columns.Add(new GridViewDataColumn("CompanyName")); |
rgvUsers.Columns.Add(new GridViewDataColumn("LastName")); |
rgvUsers.Columns.Add(new GridViewDataColumn("FirstName")); |
rgvUsers.Columns["RoleID"].HeaderText = Properties.Resources.AssignUser_ProjectRole; |
rgvUsers.Columns["CompanyName"].HeaderText = Properties.Resources.AssignUser_CompanyName; |
rgvUsers.Columns["LastName"].HeaderText = Properties.Resources.AssignUser_LastName; |
rgvUsers.Columns["FirstName"].HeaderText = Properties.Resources.AssignUser_FirstName; |
rgvUsers.Columns["Select"].ReadOnly = false; |
rgvUsers.Columns["RoleID"].ReadOnly = false; |
rgvUsers.Columns["CompanyName"].ReadOnly = true; |
rgvUsers.Columns["LastName"].ReadOnly = true; |
rgvUsers.Columns["FirstName"].ReadOnly = true; |
rgvUsers.Columns["UserID"].IsVisible = false; |
foreach (TLUser user in userList) |
{ |
object[] values = { user.UserId, false, Guid.Empty, user.CompanyName, user.LastName, user.FirstName }; |
rgvUsers.Rows.Add(values); |
} |