My C# winform has a datagridview and when I clicked update button, what code should I put to check whether any cells had been edited?
I just need to have a true or false.
Thanks.
===========================================================================
My existing codes:
#region Edit Records
private void InProSysAdministrationEventsUpdateButton_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Please Click Ok to Edit the Events", "Confirmation", MessageBoxButtons.OKCancel) == DialogResult.OK)
{
ManipulateData.UpdateData(connectionString, tblconn, tblscmd, tbldataadaptor, tbldatatable, cmbuilder, "usp_readallevents", readalleventsdataGridView);
}
}
#endregion
I need to do the following:
1) user click on edit
2) system check whether any cell had been edited
3) if no cell edited, it will messagebox.show("No Changes Done.")
4) else, it will update the database.