dgvAgenda1.AutoGenerateColumns = false;
OngletAgenda oglAgenda = new OngletAgenda(codeSinistre);
DataSet dsOnglet = oglAgenda.DataSetAgenda;
if (oglAgenda != null)
{
dgvAgenda1.DataSource = dsOnglet;
dgvAgenda1.DataMember = "Agenda";
DataGridViewComboBoxColumn dgvAgenda1Col1;
dgvAgenda1Col1 = (DataGridViewComboBoxColumn)dgvAgenda1.Columns["colAgenda1Operateur"];
//dgvAgenda1Col1.DataSource = oglAgenda.CodeOperateur; // pb
dgvAgenda1Col1.DataSource = dsOnglet; // pb
//dgvAgenda1Col1.DataPropertyName = "CodeOperateur";
dgvAgenda1Col1.DisplayMember = "CodeOperateur";
//dgvAgenda1Col1.ValueMember = "CodeOperateur";
}
Partager