protected void ddlPayment_SelectedIndexChanged(object sender, EventArgs e) { if (ddlPayment.SelectedItem.Text == "All") { BindGridView(); txtEndDate.Enabled = false; txtStartDate.Enabled = false; btnFilter.Enabled = false; txtStartDate.Text = ""; txtEndDate.Text = ""; } else { _invMstr.CompanyId = Convert.ToInt16(Session["CompanyId"]); _invMstr.PaymentStatus = Convert.ToInt16(ddlPayment.SelectedItem.Value); _ds.Tables.Add(_sobj.SA_SelectInvoiceStatus(_invMstr)); gvInvoice.DataSource = _ds; gvInvoice.DataBind(); txtEndDate.Enabled = true; txtStartDate.Enabled = true; btnFilter.Enabled = true; } }