Datagridview combox

Datagridview combox

Old forum URL: forums.lhotka.net/forums/t/754.aspx


RichardW posted on Friday, July 28, 2006

I cannot get a combox box in a datagridview (Net 2.0) to work correctly using my NVL object using CSLA 1.5.

I try:

With Me.GridComboBox

.DataSource = NVL.GetList.BindableList

.DisplayMember = "Value"

.ValueMember = "Key"

End With

All I get is an error 'Argument 'Prompt' cannot be converted to type string.

Thanks Richard

JonM replied on Friday, July 28, 2006

Richard,

In your NVL, what are the Key and Value types?  My keys are almost always ints or guids, and my values are usually ints or strings.  This type of binding works fine.

RichardW replied on Friday, July 28, 2006

Jon - My Key is an int and the Value is a string.

What's really puzzling is that I can get a regular combo box to bind perfectly - I just get the error on a combo box in a datagrid.

 

 

Copyright (c) Marimer LLC