Click here to Skip to main content
15,886,780 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello

I have a datagrid with a columntype as a "Combobox",
then the combobox must populate the items from the database for the user to select.
The combobox populates only one field from the database...

I just dont know how to do it...
I have search already in google,forums..

Please help..
Posted

1 solution

Hi jleonorlane,

you can populate your items using :

C++
DataGridViewComboBoxCell cbCell = (DataGridViewComboBoxCell)myDataGrid.Rows[0].Cells[2];
cbCell.Items.Add(.....);



you can also view this link for other details :

http://homepage.ntlworld.com/herring1/datagrid.html[^]

Hope this help you,
Good luck :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900