Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataGrid and paging
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00764239
Message ID:
00764316
Views:
24
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
Previous
Reply
Map
View

Click here to load this message in the networking platform