Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to enable paging on data grid

Reply
Thread Tools

how to enable paging on data grid

 
 
Joe Au
Guest
Posts: n/a
 
      08-19-2004
I enable paging on a data grid. But when I click on the page number, nothing
happen. Do I have to code something to handle it? Thanks.


 
Reply With Quote
 
 
 
 
Jos
Guest
Posts: n/a
 
      08-19-2004
Joe Au wrote:
> I enable paging on a data grid. But when I click on the page number,
> nothing happen. Do I have to code something to handle it? Thanks.


You need to handle the PageIndexChanged event.

Use this code (for VB):

Sub DataGrid1_PageIndexChanged(sender As Object, e As
DataGridPageChangedEventArgs)
DataGrid1.CurrentPageIndex = e.NewPageIndex
BindData() ' bind the grid again
End Sub

For more information, see:
http://aspnet.4guysfromrolla.com/art...70903-1.2.aspx

or search Google for "datagrid paging".

--

Jos


 
Reply With Quote
 
 
 
 
Joe Au
Guest
Posts: n/a
 
      08-19-2004


Thanks to Jos.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Grid Paging Niclas ASP .Net 2 11-16-2005 07:10 PM
How do I remove the paging links from a data grid when there's only one page? Alan Silver ASP .Net 6 07-28-2005 07:52 AM
Data grid paging Error =?Utf-8?B?YXNhZA==?= ASP .Net 2 05-08-2005 02:12 PM
Data Grid Paging Bug? Steve Taylor ASP .Net 1 09-15-2004 06:29 PM
Paging of a data grid Andrew Banks ASP .Net 2 04-02-2004 05:07 PM



Advertisments