By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,226 Members | 1,193 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,226 IT Pros & Developers. It's quick & easy.

How to populate combobox nested within dataGridView

P: n/a
Hi,

I've a column in a dataGridView set as combobox. I can't find any example
showing how to populate the list in the combobox. Does anyone have an example
showing me this.

Regards Jesper.

Jul 18 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

You can click the dataGridView in the designer and open the Columns
property. Select the column that you specified as a combo box and open the
Items property for that column. You can add your combo box items for this
column in here. You can accomplish the same thing through code:

DataGridViewComboBoxColumn myCol = dataGridView1.Columns[3];
myCol.Items.Add("1");
myCol.Items.Add("2");
myCol.Items.Add("3");

Adrian.
--
[Please mark my answer if it was helpful to you]


"Jesper, Denmark" wrote:
Hi,

I've a column in a dataGridView set as combobox. I can't find any example
showing how to populate the list in the combobox. Does anyone have an example
showing me this.

Regards Jesper.
Jul 18 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.