Net datagridview cellvalidating

Current Cell = dgv_details[0, 0];//开始编辑状态dgv_details.

Below is the code how I am trying to validate those i enter duedate less than hiredate, the program displays the error , "Date entered is less than hired date!!

"but when i correct and enter a valid date, i still get an error. Data Grid View Cell Validating Event Args) _ Handles Rental Data Grid View.

In the Cell End Edit event handler, set the Error Text property on the row to the empty string.

The Cell End Edit event occurs only when the cell exits edit mode, which it cannot do if it fails validation.

定义单元格验证要求:验证错误后焦点不离开。实现:单元格的验证可以使用dgv_details_Cell Validating事件。验证不通过时调用e.

Comments