Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataGrid and paging
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00764239
Message ID:
00764316
Vues:
23
Hi Robert,

After you set the current page for the DataGrid, you need to set the DataSource and any other settings for the datagrid. The standard approach is to use a custom method (like BindDataGrid) and it performs all the binding. Then you call that routine from PageIndexChanged event.

>hi!
>
>i put a datagrid onto my webform which displays data in a dataset (source=sql-server). the datagrid is limited to 10 entries the others are available over 'paging'.
>
>i put the following code onto my webform:
>
>Private Sub myGrid_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles myGrid.PageIndexChanged
>        Me.myGrid.CurrentPageIndex = e.NewPageIndex
>        Me.myGrid.DataBind()
>End Sub
>
>
>on one webform everything is ok but on the other webform when the paging event is executed the datagrid dispears.
>
>any ideas?
>TIA
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform