DataGridViewComboBoxColumn

M

mamil

Hi Gurus.

I want to display a datagridview with a column of type
DataGridViewComboBoxColumn.
I don't want to bind this column to the datasource of the datagridview.
I tried adding the column through the wizard, but encountered the
following exception when displaying the grid:
System.FormatException: The value of the DataGridViewComboBoxCell is
invalid.

Only when there was no data at all in the combo box I didn't get those
exceptions, but that is, naturally, not very helpful.

I know how to display the values of a DataGridViewComboBoxColumn when
it is bound to a datasource, but again - I don't want it binded to
anything.

How can I do that?

Thanks!
 
T

Tom Krueger [MSFT]

Hello,

I probably can help you out, however, I don't quite understand what you are
trying to accomplish. If you post some more details as to how functionaly
you want the form to work I should be able to recommend something.

The main thing I don't understand is why you don't want the datagridview
datasource to bind to the ComboBoxColumn. Not that the why really matters,
it's more that I want to make sure I am helping you solve the right problem.

--
Tom Krueger

My Blog - http://weblogs.asp.net/tom_krueger
Smart Client DevCenter - http://msdn.microsoft.com/smartclient/
Mobile DevCenter - http://msdn.microsoft.com/mobility

This posting is provided "as is" with no warranties and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top