HI,
I want to put several DataGridViewCom boBox (which map their own
datatable) into a DataGridView. Different Rows of DataGridView will load
their own DataGridViewCom boBox.
is it possible to do so?
// blockList, cSubjectGroupLi st, subjectGroupLis t are DataTable
foreach (DataRow blockRow in blockList.Rows)
{
DataGridViewCom boBoxColumn column = new DataGridViewCom boBoxColumn();
column.DataSour ce = cSubjectGroupLi st;
column.ValueMem ber =
subjectGroupLis t.Columns["Subject_Gr oup"].ToString();
column.DisplayM ember =
subjectGroupLis t.Columns["Subject_Gr oup"].ToString();
column.Name = blockRow["Block"].ToString();
dataTable1.Colu mns.Add(blockRo w["Block"].ToString());
column.DataProp ertyName = blockRow["Block"].ToString();
dataGridView1.C olumns.Add(colu mn);
}
dataGridView1.D ataSource = dataTable1
*** Sent via Developersdex http://www.developersdex.com ***
I want to put several DataGridViewCom boBox (which map their own
datatable) into a DataGridView. Different Rows of DataGridView will load
their own DataGridViewCom boBox.
is it possible to do so?
// blockList, cSubjectGroupLi st, subjectGroupLis t are DataTable
foreach (DataRow blockRow in blockList.Rows)
{
DataGridViewCom boBoxColumn column = new DataGridViewCom boBoxColumn();
column.DataSour ce = cSubjectGroupLi st;
column.ValueMem ber =
subjectGroupLis t.Columns["Subject_Gr oup"].ToString();
column.DisplayM ember =
subjectGroupLis t.Columns["Subject_Gr oup"].ToString();
column.Name = blockRow["Block"].ToString();
dataTable1.Colu mns.Add(blockRo w["Block"].ToString());
column.DataProp ertyName = blockRow["Block"].ToString();
dataGridView1.C olumns.Add(colu mn);
}
dataGridView1.D ataSource = dataTable1
*** Sent via Developersdex http://www.developersdex.com ***
Comment