I am having a problem and had been searching the web and couldn't find anything that will help me.
this is my problem.
Im working in WinForm , c#
I have a grid where is a Column of type **GridViewDateTimeColumn**.
When the user update a row I check it in the event **RowValidating** and if I get a repeated date or other error I show the user a message and I do **e.cancel = true** to not validate the row.
But then If I press ESC. I cannot cancel all the changes like it usually does before
Any idea how to do it?
Here is my code:
sender, RowValidatingEventArgs e)
Cursor.Current = Cursors.WaitCursor;
//Generate a service to connect to DB
var factory =
var service = factory.CreateChannel();
//here I call a SP in the database that check if the dates are correct (column of dates are call it "MiTaarich" and "AdTaarich".
//The SP return a String with the error, if there is no error it will return and empty string
sError = GetErrorPirteySacharMenahel(Convert.ToDateTime(e.Row.Cells[
Cursor.Current = Cursors.Default;
I also tried adding this code when i get the error:
DataTable dt = (grdPirteyMenahel.DataSource
But this recover the value of date as it was before (what is good) but doesn't let me get out of the row when I press ESC
Any idea how to solve it?
thank you very much