L
Luis Esteban Valencia
I dont know what happens, but when I click on page 2 it disappears. I made a
breakpoint on each line of page:_indexchanged and the visible property is
equal to true.
this is my code
private void Page_Load(object sender, System.EventArgs e)
{
// Introducir aquí el código de usuario para inicializar la página
if(!Page.IsPostBack)
{
System.Configuration.AppSettingsReader configurationAppSettings = new
System.Configuration.AppSettingsReader();
sqlConnection1.ConnectionString =
((string)(configurationAppSettings.GetValue("Conexion1", typeof(string))));
cargarProveedores();
cargarComprobantes();
}
}
private void cargarComprobantes()
{
SqlDataAdapter sqlDataAdatper2= new SqlDataAdapter("select * from
vwCompProveedores order by fecha", sqlConnection1);
DataSet ds = new DataSet();
sqlDataAdatper2.Fill(ds, "proveedores");
dgComprobantes.DataSource = ds;
dgComprobantes.DataBind();
}
private void dgComprobantes_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
dgComprobantes.CurrentPageIndex = e.NewPageIndex;
dgComprobantes.DataBind();
}
breakpoint on each line of page:_indexchanged and the visible property is
equal to true.
this is my code
private void Page_Load(object sender, System.EventArgs e)
{
// Introducir aquí el código de usuario para inicializar la página
if(!Page.IsPostBack)
{
System.Configuration.AppSettingsReader configurationAppSettings = new
System.Configuration.AppSettingsReader();
sqlConnection1.ConnectionString =
((string)(configurationAppSettings.GetValue("Conexion1", typeof(string))));
cargarProveedores();
cargarComprobantes();
}
}
private void cargarComprobantes()
{
SqlDataAdapter sqlDataAdatper2= new SqlDataAdapter("select * from
vwCompProveedores order by fecha", sqlConnection1);
DataSet ds = new DataSet();
sqlDataAdatper2.Fill(ds, "proveedores");
dgComprobantes.DataSource = ds;
dgComprobantes.DataBind();
}
private void dgComprobantes_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
dgComprobantes.CurrentPageIndex = e.NewPageIndex;
dgComprobantes.DataBind();
}