Patrik
2007-07-24 14:26:48 UTC
Hi,
I have a datagridview where I perform cell validation. I do not want the
user to be able to leave edit mode if the value is incorrect. The reason is
that i use CellEndEdit to write the value to my hardware. I validate the
value and set the cancel flag if the value is invalid. The problem is that I
also want the user to get an error message informing him that the value is
incorrect.
My problem is that it does not work to set cell.ErrorText because it will
not show until I leave edit mode. I use errorproviders through out my
program so I do not want to use a messagebox or something like that. Is
there a solution so that I can show the errortext and force the user to stay
in edit mode by setting the cancel flag at the same time?
My grid do not have the rowHeader visible so I can not display anything
there.
/Patrik
I have a datagridview where I perform cell validation. I do not want the
user to be able to leave edit mode if the value is incorrect. The reason is
that i use CellEndEdit to write the value to my hardware. I validate the
value and set the cancel flag if the value is invalid. The problem is that I
also want the user to get an error message informing him that the value is
incorrect.
My problem is that it does not work to set cell.ErrorText because it will
not show until I leave edit mode. I use errorproviders through out my
program so I do not want to use a messagebox or something like that. Is
there a solution so that I can show the errortext and force the user to stay
in edit mode by setting the cancel flag at the same time?
My grid do not have the rowHeader visible so I can not display anything
there.
/Patrik