Example #1
0
 private void dgvBillDetail_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (dgvBillDetail.Columns[e.ColumnIndex].Name == "btnViewColumn")
         {
             int id = (int)dgvBillDetail.Rows[e.RowIndex].Cells["Mã Hóa Đơn"].Value;
             dgvBillDetail.Columns.RemoveAt(e.ColumnIndex);
             dgvBillDetail.DataSource = "";
             dgvBillDetail.DataSource = BillDAL.GetDetailsByBillId(id);
         }
     }
     catch (Exception ex)
     {
     }
 }