It generates an error message when i type in the name of the item.
The rest of the cell validations are perfectly working!
Unfortunately the code only allows integers to be entered in the datagridview.
Since i have a column name as "Item Name" which is supposed to be entered as text there is an issue in the code.
I know I can do a string.replace to remove the "\r\n" but I cannot catch it in the correct event. Key down, key press and key up events do not work as it is too the the carriage return already executed and the focus is in the new row.
Add(col ID); Data Grid View Text Box Column col Load Expiry Date = new Data Grid View Text Box Column(); //Calendar Column col Load Expiry Date = new Calendar Column(); col Load Expiry Date. For more information about handling events, see NIB: Consuming Events.I have a windows form application which contains a datgridview.This is the most straight forward method as it envolves no software changes.Phil I ended up focusing in the data Grid View Cell that i wanted to be in after the carriage return. Phil - thanks for the suggestion but in this case, in this app the carriage return is needed in all other instances.