pagination and procedure stored

  • Thread starter Don Quijote de Nicaragua
  • Start date
D

Don Quijote de Nicaragua

Hello chic@s, I have problem with pagination and procedure stored, can to
show information within DataGrid, but when I do click in nobody of the
number which they down appear for the pagination, do not change the
registries.... always shows the first page, somebody has some idea of so
that it can be this... greetings and thanks.

Don Quijote de Nicaragua.
Elder Soto.
Nota: Aqui esta el código que uso

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
udfCargarDatos()
End If
End Sub

Private Sub grdGeneral_PageIndexChanged(ByVal source As System.Object, ByVal
e As System.Web.UI.WebControls.DataGridPageChangedEventArgs)
grdGeneral.CurrentPageIndex = e.NewPageIndex
udfCargarDatos()
End Sub

Private Sub udfCargarDatos()
Dim Cn As New
SqlConnection(ConfigurationSettings.AppSettings("strConex"))
Dim cmd As New SqlCommand("spRecuperarDatosNotas", Cn)
Dim da As SqlDataAdapter, ds As DataSet
cmd.CommandType = CommandType.StoredProcedure
'Definir el comando para el Parametro
cmd.Parameters.Add("@CodUbica", SqlDbType.Int)
'Pasar el parametro
cmd.Parameters("@CodUbica").Value = Convert.ToInt32(1)
da = New SqlDataAdapter(cmd)
' Obtener un DataSet y pasarlo al DataGrid
ds = New DataSet
da.Fill(ds)
'Pagina el DataGrid con el DataBind
Me.grdGeneral.DataSource = ds
Me.grdGeneral.DataBind()
Cn.Close()
End Sub

En Español:

Hola chic@s, tengo un problema con la paginación y un procedimiento
almacenado, puede mostrar la información dentro del DataGrid, pero cuando
hago click en cualquier de los número que aparecen abajo para la paginación,
no cambian los registros .... siempre me muestra la primera página, alguien
tiene alguna idea de por que puede ser esto... saludos y gracias.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top