English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have a dataview that i fill with a dataset. All it has is Employee_ID and Log_Time. I specifiy the Employee_ID that I want. It loads fine and I have allowpaging=true and page = 20. What kida of code do I need to write in the PageIndexChanging event for my dataview so that it will page threw my dataset that loads the dataview. I have no idea where to start for this paging action?

2007-01-11 06:00:55 · 3 answers · asked by csdraska 1 in Computers & Internet Programming & Design

3 answers

put this in your markup:
AllowPaging="True" PageSize="10"
/>

and this in your code-behind:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
grid.DataSource = ' your dataset
grid.DataBind()
End If
End Sub

Protected Sub grid_PageIndexChanged(ByVal sender As System.Object, ByVal e As DataGridPageChangedEventArgs) Handles grid.PageIndexChanged
grid.CurrentPageIndex = e.NewPageIndex
grid.DataSource = ' your dataset
grid.DataBind()
End Sub

2007-01-11 06:37:53 · answer #1 · answered by MinstrelInTheGallery 4 · 0 0

Try a gridview or a detailsview.

2007-01-11 14:09:45 · answer #2 · answered by IT Pro 6 · 0 0

check http://www.pscode.com for great examples.

2007-01-11 22:25:36 · answer #3 · answered by Richard H 7 · 0 0

fedest.com, questions and answers