DataGridViewComboBoxColumn which allows items not in the list

J Trahair

Well-known member
Joined
May 14, 2008
Messages
175
Location
Spain
Programming Experience
10+
I need to populate a drop down combo box in a DGV, such that it allows an item from the database but not in the list.

Example:
in the current employees combo box in the Sales spreadsheet:
Albert
Bill
Chris
Dave
Eddy
etc.

Fred left last month and is not in the above list. However, his name must come up when reviewing sales figures for the previous 6 months.

I have tried one method but it won't allow Fred to stay in the SalesFigures spreadsheet - it substitutes another name (in the list) instead of his.

VB 2005, WXP, unbound SQL Express database.
 
You would have to inherit the DataGridViewComboBoxColumn and DataGridViewComboBoxcell and provide that functionality yourself. The existing classes are designed to work with bound lists only, where the cell value must be in the column list.
 
Thank you. I did a workaround along the lines you suggested - perhaps this is the actual solution, not just a fudge!
 
Back
Top