コード例 #1
0
 private void dgvMon_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
 {
     ((DataGridViewComboBoxCell)dgvMon.Rows[e.RowIndex].Cells["colLoaiMon"]).DataSource    = LoaiMonBUS.LayDanhSachTatCaLoaiMon();
     ((DataGridViewComboBoxCell)dgvMon.Rows[e.RowIndex].Cells["colLoaiMon"]).DisplayMember = "TenLoaiMon";
     ((DataGridViewComboBoxCell)dgvMon.Rows[e.RowIndex].Cells["colLoaiMon"]).ValueMember   = "MaLoaiMon";
 }