private void FillSentDate() { iPBillId = Convert.ToInt32(grdViewDemand.GetFocusedRowCellValue("PBillId")); try { dtSD = new DataTable(); dtSD = ProgBillBL.GetSentDate(iPBillId); grdSent.DataSource = null; grdSent.DataSource = dtSD; grdViewSent.PopulateColumns(); grdSent.ForceInitialize(); grdViewSent.OptionsSelection.InvertSelection = true; grdViewSent.OptionsSelection.EnableAppearanceHideSelection = false; grdViewSent.Appearance.FocusedRow.BackColor = Color.Teal; grdViewSent.Appearance.FocusedRow.ForeColor = Color.White; grdViewSent.BestFitColumns(); } catch (Exception ex) { BsfGlobal.CustomException(ex.Message, ex.StackTrace); } }