Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Paging using Asp.net 2005 - c#

 
webmaster forum
nikon  Offline
Activity
0%
 
New Coder
Posts: 20
Topics: 13
September 10, 2008, 01:16:37 AM

Hello

I am using VS 2005, I am using gridview to bind data. I have already binded data using Data Adapter. I want to know how can I add paging in the gridview? Can anyone point me to a good tutorial for it?

Any help regarding this is appreciated.
 
webmaster forum
Corrinla  Offline
Activity
0%
 
New Coder
Posts: 28
Topics: 0
December 07, 2010, 07:09:32 PM

sorry, i have little knowledge about it.

pandora jewelry | wholesale
 
webmaster forum
Activity
0%
 
New Coder
Posts: 25
Topics: 1
WWW
March 21, 2011, 04:52:22 AM

You can use page index changed event
 

Nursing Assistant | Nursing Assistant Job | Nursing Assistant Salary
 
webmaster forum
dianna  Offline
Activity
0%
 
Regular Coder
Posts: 88
Topics: 10
WWW
August 07, 2011, 11:26:59 PM

Source code for the following post can be downloaded here.

Paging data is one of those basic things most, if not every developer will have to do from time to time.
In the following approach, we're going to use a ListView, DataPager and an ObjectDataSource to achieve this. Equally one can use a DataView and simply use it with an ObjectDataSource - I personally prefer the ListView, simply because I feel its a more flexible control.

Lets have a look at the ObjectDataSource first:
Code:
<asp:ObjectDataSource ID="obsFriends" runat="server"
SelectCountMethod="CountFriends"
SelectMethod="ViewFriends" TypeName="friends" EnablePaging="true">
</asp:ObjectDataSource>
Notice that we'll need a "SelectCountMethod", this method returns a count of the total rows that needs paging, the "SelectMethod" is the method that returns the actual rows.

Pakistan's Local Search engine
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 04, 2012, 09:16:39 PM