private void GetRetirementDate(string strStDate, string strEndDate) { grRetirementDate.DataSource = objMst.GetRetirementDate(strStDate, strEndDate); grRetirementDate.DataBind(); foreach (GridViewRow gRow in grRetirementDate.Rows) { gRow.Cells[4].Text = Common.DisplayDate(gRow.Cells[4].Text); if (Convert.ToDecimal(gRow.Cells[5].Text) == 0) { gRow.Cells[5].Text = "Today"; gRow.Cells[5].BackColor = System.Drawing.Color.LightGreen; } else if (Convert.ToDecimal(gRow.Cells[5].Text) < 0) { gRow.Cells[5].Text = "0"; } } lblRetirementDate.Text = grRetirementDate.Rows.Count.ToString(); if (grRetirementDate.Rows.Count > 0) { pnlRetirement.Visible = true; } else { pnlRetirement.Visible = false; } }