Ver Mensaje Individual
  #12 (permalink)  
Antiguo 17/07/2008, 14:19
Avatar de mdavila
mdavila
 
Fecha de Ingreso: julio-2007
Ubicación: Montevideo (Uruguay)
Mensajes: 919
Antigüedad: 16 años, 9 meses
Puntos: 13
Respuesta: Error al querer poner paginación en los Datagrid

hace una cosa, en tu procedimiento Bin_Data..... pasale por parametro el indice que queres en tu grilla tambien

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load


If Not IsPostBack Then

Bind_Data("select idnoticias, fechanoticia, titulo from noticia ORDER BY idnoticias DESC",0)

End If
End Sub

Y cuando lo llamas de otro lado le pasa el indice correspondiente y listo.

Private Sub dnoticias_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEvent Args) Handles

Bind_Data("select idnoticias, fechanoticia, titulo from noticia ORDER BY idnoticias DESC", e.NewPageIndex)


End Sub

y en tu Evento Bin_Data solo le asignas el indice que te viene por parametro.

Suerte.