CLR: .Net / Mono / Boo / Otros CLR > ASP .NET
Paginar Un Datagrid Con Asp.net
senzao18:
Para paginar yo uso el siguiente procedimiento
--- Código: Text --- Sub DataGrid1_IndexChanged(ByVal obj As Object, ByVal e As DataGridPageChangedEventArgs) DataGrid1.CurrentPageIndex = e.NewPageIndex DataGrid1.DataBind() End Sub
Y en vista HTML
añado lo que esta en azul despues de cambiar algunas de las propiedades de allowpaging, pagesize "algo asi son jejeje la verdad no recuerdo exactamente como se escriben" en vista de diseño.
<asp:datagrid id="DataGrid1" style="Z-INDEX: 103; LEFT: 64px; POSITION: absolute; TOP: 112px"
runat="server" BackColor="#DEBA84" BorderStyle="None" BorderColor="#DEBA84" Height="1072px" Width="880px" AllowPaging="True" HorizontalAlign="Justify" CellPadding="3" BorderWidth="1px" CellSpacing="2" OnPageIndexChanged="DataGrid1_IndexChanged" PageSize="40">
jaja ahi bienen si las escribi bien :D.
Navegación
[*] Página Anterior
Ir a la versión completa