I have a Master Detail Form where in my Detail Datagridview I am inserting record in a row at run time and than click on save button the row is not save and hide this row, while that when my cursor is on next row the record is save correctly, why this is not save the record when my cursor at first record.
My Save button code is here:
private void employee_Attendance_MasterBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
try {
this.Validate();
this.employee_Attendance_MasterBindingSource.EndEdit();
this.employee_Attendance_MasterTableAdapter.Update(this.dataSet_Employee_Attendance.Employee_Attendance_Master);
this.Validate();
this.employee_Attendance_DetailBindingSource.EndEdit();
this.employee_Attendance_DetailTableAdapter.Update(this.dataSet_Employee_Attendance.Employee_Attendance_Detail);
MessageBox.Show("Record has been updated");
}
catch (Exception) { }
}
Loading
Saqib MalickPosted Dec 30, 2009, 10:37 AM
But now I have solved my issue, I install VS 2005 and now it is work fine and save the record in data base, while that when the same code run in VS 2008, it is not saving the data in database.
Sam HobbsPosted Dec 29, 2009, 1:42 PM
I don't know what you mean by "hide this row".
I dun't understand the relevance of the cursor in this question.
I don't know if I can help but if you can clarify these items then it might help others to help you.