Example #1
0
 private void grwDanhSach_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (e.ColumnIndex == 12)
     {
         frmSelectPhong fsp = new frmSelectPhong();
         fsp.StartPosition = FormStartPosition.CenterParent;
         if (fsp.ShowDialog() == DialogResult.OK)
         {
             grwDanhSach.CurrentRow.Cells[11].Value = string.Join(";", fsp.Result());
         }
     }
 }
Example #2
0
 private void dgrDanhSach_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         if (e.ColumnIndex == 0)
         {
             frmSelectPhong fsp = new frmSelectPhong(Convert.ToString(dgrDanhSach.CurrentRow.Cells[6].Value));
             fsp.StartPosition = FormStartPosition.CenterParent;
             if (fsp.ShowDialog() == DialogResult.OK)
             {
                 dgrDanhSach.CurrentRow.Cells[6].Value = string.Join(";", fsp.Result());
             }
         }
     }
     catch (Exception)
     {
     }
 }