private void Load_Activity() { try { if (dgvBatcList.Rows.Count > 0) { DataTable dt = objBatchActivity_DL.Get_DataView_Rework(dgvBatcList.CurrentRow.Cells["BatchNo"].Value.ToString(), (int)Batch.Status.In_Progress, "Rework", "Repack", (int)BatchActivity.Status.Initial, (int)BatchActivity.Status.Start); objSourceActivityList.DataSource = dt; dgvActivity.AutoGenerateColumns = false; dgvActivity.DataSource = objSourceActivityList; objSourceActivityList.ResetBindings(true); } SetColors(); } catch (Exception) { MessageBox.Show(this, "Error occured while loading Batch List", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }