Hola!.Estoy necesitando hacer es al entrar al abm me muestre la grilla vacia y despues al hacer la busqueda me muestre los datos.
Intente poniendo a la grilla la propiedad visible y showheader y nada no me lo muestra en el abm.
Saludos
| |||
| Hola!.Estoy necesitando hacer es al entrar al abm me muestre la grilla vacia y despues al hacer la busqueda me muestre los datos. Intente poniendo a la grilla la propiedad visible y showheader y nada no me lo muestra en el abm. Saludos |
| ||||
| Respuesta: mostrar un gridview vacio Mirá estos ejemplos http://www.codeproject.com/KB/aspnet...iew_issue.aspx http://weblogs.asp.net/joewrobel/arc...-is-empty.aspx http://mattberseth.com/blog/2007/07/...nd_footer.html
__________________ http://geekswithblogs.net/jaullo/Default.aspx Si te he ayudado regalame Karma positivo!!! |
| |||
| Respuesta: mostrar un gridview vacio Aquí un pequeño ejemplo:
Código:
Saludos! protected void Page_Load(object sender, EventArgs e)
{
this.LoadData();
}
private void LoadData()
{
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("User");
dt.Columns.Add("Email");
DataRow dr = dt.NewRow();
dr["Name"] = String.Empty;
dr["User"] = String.Empty;
dr["Email"] = String.Empty;
dt.Rows.Add(dr);
this.GridView1.DataSource = dt;
this.GridView1.DataBind();
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
GridViewRow row = e.Row;
if (row.RowIndex > -1)
for (int i = 0; i < row.Cells.Count; i += 1)
row.Cells[i].Visible = false;
}
|
| Etiquetas: |