-1
我想從datagridview的數據,然後從其中包含字符串獲取數據到對象數組,然後填充組合框
public class Departmentinfo
{
public string departmentname;
.
.
.
.
}
Departmentinfo dep[];
private void getdepartments()
{
for (int i = 0; i < dataGridView1.RowCount; i++)
{
college.department[i].departmentname = Convert.ToString(dataGridView1.Rows[i].Cells[0].Value);
}
}
private void putdepinfo()
{
comboBox4.DataSource = dep[].departmentname;
}
請建議對象數組使用數據填充組合框!
是否使用VB6? –
@ user3003216沒有VB10 –