Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

 

I've made a form with a datagridview and 1 column configured as a combobox.

I like to fill the combobox on the load of the program... But how can i reach the combobox ?

 

combobox3.columns[3].Items.Add("item"); ?

 

Something like that.. but i cant find it..

Posted

Hi,

 

This does what you need/want

 

 

DataGridViewComboBoxColumn cln_cmb_birthay;

cln_cmb_birthay = new DataGridViewComboBoxColumn();

cln_cmb_birthay.DataPropertyName = "Names";

cln_cmb_birthay.DataSource = myDataTable;

cln_cmb_birthay.DisplayMember = "Names";

cln_cmb_birthay.HeaderText = "Choose Names";

cln_cmb_birthay.Name = "cln_cmb_birthay";

 

.eof

 

Teixeira

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...