c# - DataGridView Cell value not available for validation when inserting a new row -
situation: i'm writing winforms app using c# in vs2013 .net4.0. to carry out cell level validation in datagridview handle cellvalidating event. when validating access user input values with dgv.rows[e.rowindex].cells[e.columnindex].value for validation of existing rows works fine. issue: when user types cell on new row , presses, example, tab move next cell cellvalidating event fires value contains null. question: how access user has typed in these circumstances? i'm thinking should maybe endedit before validating thought cellvalidating inherently "while-editing" event. edit the validation takes place in validator class top end of looks this: public void validatecell(string tablename, datagridview datagrid, datagridviewcellvalidatingeventargs e, columncatalogue columncatalogue) { if (!(datagrid.rows[e.rowindex].cells[e.columnindex].value == null || datagrid.rows[e.rowindex].cells[e.columnindex].value == dbnull...