// Here is the only setting up of the grid that is done
// the grid is bound to the object m_GroupAssignList
public frmUserSecurity()
{
InitializeComponent();
// Get business objects
// Not shown
(UserGrid.Columns["UserName"] as GridViewComboBoxColumn).DataSource = m_UserList;
(UserGrid.Columns["UserName"] as GridViewComboBoxColumn).ValueMember = "UserName";
(UserGrid.Columns["UserName"] as GridViewComboBoxColumn).DisplayMember = "UserName";
(UserGrid.Columns["SecurityGroup"] as GridViewComboBoxColumn).DataSource = m_GroupList;
(UserGrid.Columns["SecurityGroup"] as GridViewComboBoxColumn).ValueMember = "SecurityGroupId";
(UserGrid.Columns["SecurityGroup"] as GridViewComboBoxColumn).DisplayMember = "Description";
UserGrid.DataSource = m_GroupAssignList;
}
I have also tried to manually add the row to the grid but the same issue exists:
private void UserGrid_UserAddingRow(object sender, GridViewRowCancelEventArgs e)
{
e.Cancel = true;
UserGrid.Rows.Add(Id, UserName, SecurityGroupId);
}
Any advice?