public void CarregarGrid() { DataSet ds = ProdutoDB.SelectAllGrid(); int qtd = ds.Tables[0].Rows.Count; if (qtd > 0) { gdv.DataSource = ds.Tables[0].DefaultView; gdv.DataBind(); gdv.Visible = true; lblGrid.Text = "Foram encontrados " + qtd + " registros"; } else { gdv.Visible = false; lblGrid.Text = "Não foram encontrado registros..."; } }