I have a DataGridView where the units can be entered in a TextBox column. ... Use the MaxInputLength property of the DataGridViewTextBoxColumn .
stackoverflow.com