Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Jada Mohammad   on Apr 02 In Asp.net Category.

  
Question Answered By: Archie Parker   on Apr 02

in your HTML you have to write:


<DataGrid
id=DataGrid1
AllowPaging="True"
PageSize="10" ' or other desired one
OnPageIndexChanged="DataGrid1_PageChanger"
>

Then you have to write a Public Sub DataGrid1_PageChanger:

Public Sub DataGrid2_PageChanger(ByVal objSender As Object, ByVal objArgs As DataGridPageChangedEventArgs)

... 'Get your data  From Database ...

DataGrid2.CurrentPageIndex = objArgs.NewPageIndex

' ... rebind data to datagrid  ...

DataGrid1.DataSource = myDataSet
DataGrid1.DataMember = "ArtikelTabel"
DataGrid1.DataBind()

End Sub

Implement something like this should work!

Share: 

 
 
Didn't find what you were looking for? Find more on Paging in DataGrids Or get search suggestion and latest updates.


Tagged: