Try the attached sample. It shows how to dynamically create a cell editor and how to store the custom value in the cell. It displays 10 columns and 1000 rows and creates 5 different cell editors on different rows: DateTimePicker, ComboBox, NumericUpDown, TrackBar and TextBox with auto suggest list.
The sample is somewhat rudimentary since it creates a new editor each time edit mode is started. You can cache editors or create new ones according to your requirements.
You can also assign the Column.Editor property only once instead of recreating the editor each time.
Additionally, if your editor implements the IDataGridViewEditingControl interface you don’t have to store the custom value in EndEdit.
Please login first to submit.