Hi All,
I have a radGridView that is populated via a TableAdapter:
The radGridView is read only, however, I have a "detail" section below the radGridView where users can edit the contents of the records. The database is updated upon clicking a "save" button via a stored procedure of the TableAdapter:
When this is clicked, the database is properly updated, however, the radGridView does not refresh to reflect the changes.
From what I've read, it seems like the radGridView is supposed to automatically updated. What am I missing or doing wrong? Any help with this is greatly appreciated.
Robert
I have a radGridView that is populated via a TableAdapter:
buUserTableAdapter buUserTA = new buUserTableAdapter(); |
protected BindingSource buUserBindingSource = new BindingSource(); |
buUserBindingSource.DataSource = buUserTA.GetData(); |
this.radGvAdminUsers.DataSource = buUserBindingSource; |
The radGridView is read only, however, I have a "detail" section below the radGridView where users can edit the contents of the records. The database is updated upon clicking a "save" button via a stored procedure of the TableAdapter:
private void radBtnAdminSaveUser_Click(object sender, EventArgs e) |
{ |
int userId = Convert.ToInt32(lblAdminUserDBID.Text); |
string userLogin = this.radTxtAdminLoginId.Text.ToUpper(); |
string lastName = this.radTxtAdminLastName.Text; |
string firstName = this.radTxtAdminFirstName.Text; |
string userPhone = this.radMTxtAdminPhone.Value.ToString().Trim(); |
int userRole = Convert.ToInt32(this.radComboAdminRole.SelectedValue); |
string userRoleDesc = radComboAdminRole.Text; |
bool userActive = Convert.ToBoolean(this.radCbAdminUserIsActive.Checked); |
if (userId != 0) |
{ |
buUserTA.UpdateSP(userId, userLogin, lastName, firstName, userPhone, userRole, userActive, System.Configuration.ConfigurationManager.AppSettings["UserNetworkId"].ToString()); |
} |
else |
{ |
//Need to do an insert for a new user and update for the new id |
userId = Convert.ToInt32(buUserTA.InsertSP(userLogin, lastName, firstName, userPhone, userRole, System.Configuration.ConfigurationManager.AppSettings["UserNetworkId"].ToString())); |
} |
} |
When this is clicked, the database is properly updated, however, the radGridView does not refresh to reflect the changes.
From what I've read, it seems like the radGridView is supposed to automatically updated. What am I missing or doing wrong? Any help with this is greatly appreciated.
Robert