• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lookup in DataGridView? Any Progress? Worth Trying?

P

Patrick A

#1
In a DataGridView, is it possible to have a column that manages user
input by providing a "drop down" list of values the user can choose
from, with those values either being "spelled out" in code or read
from another db.table.column?

If so, does anyone know where I might find instructions on how to set
that up?


I've seen lots of old posts on this topic, but nothing necessarily
specific to the latest incarnation of the DataGrid, the DataGridView.


Is it worth trying to pop a List Box on the ColEdit event, let the
user "select" from the List Box, and "write" the value the user
selects to the cell they are editing?

Thanks,

Patrick
 

My Computer

F

Family Tree Mike

#3
On 12/10/2009 5:53 PM, Patrick A wrote:

> In a DataGridView, is it possible to have a column that manages user
> input by providing a "drop down" list of values the user can choose
> from, with those values either being "spelled out" in code or read
> from another db.table.column?
>
> If so, does anyone know where I might find instructions on how to set
> that up?
>
>
> I've seen lots of old posts on this topic, but nothing necessarily
> specific to the latest incarnation of the DataGrid, the DataGridView.
>
>
> Is it worth trying to pop a List Box on the ColEdit event, let the
> user "select" from the List Box, and "write" the value the user
> selects to the cell they are editing?
>
> Thanks,
>
> Patrick
It sounds like you want a DataGridViewComboBoxCell. Look here:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcell.aspx


--
Mike
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)