Groups | Blog | Home
all groups > asp.net datagrid control > october 2004 >

asp.net datagrid control : How to create a Paging navigation in a datagrid?


stanley mroczek
10/2/2004 8:40:54 AM

Hello,

I created a data grid which 500 records .


Now i need to create the navigation. Something like:

Previous [Current Page] of [Total Pages] Next

Can someone help me out?

Thank you,
stan


*** Sent via Developersdex http://www.developersdex.com ***
Raghu Raman
10/4/2004 2:57:44 AM
Hi freind,

It is very simple.Just set the right click the grid and set the

Allowcustompaging=false;
Allowpaging =true;
and in u r code, set

dgrid.datasource=dset.tables["t1"].defaultview.
dgrid.databind().

The default itself tells the grid to to take care of the pagins.


With Regards
Raghu



*** Sent via Developersdex http://www.developersdex.com ***
rosh
10/7/2004 12:24:25 AM
the paging naviagtion is fine but could you help me with the format i
want it to be displayed in?
i want the paging to be displayed as follows:
<PREVIOUS[text box editable][total records][GO button]NEXT>
The functionality is:
1.when i click on PREVIOUS i go to previous page(but obvious :))
2.same for NEXT
3.the TEXTBOX is provided for adding page number
4.TOTAL RECORDS display the nn editable text with total number of
records.
5. the GO button when clicked must take me to the page provided by user
in the TEXTBOX.

is such sort of thing possible in datagrid paging?can i add textbox and
Buttons from my code behind in the PAGER aprt of DataGrid?
can anyone help me out with the same
thnkx


cheers

*** Sent via Developersdex http://www.developersdex.com ***
rosh
10/7/2004 9:20:55 PM
hi friend,
thankx for ur reply but all u told was about how do i do paging in
DataGrid ....my rpoblem is different :(
let me explain it to u:

the format i want it to be displayed is:
i want the paging to be displayed as follows:
<PREVIOUS[text box editable][total records][GO button]NEXT>
The functionality is:
1.when i click on PREVIOUS i go to previous page(but obvious :))
2.same for NEXT
3.the TEXTBOX is provided for adding page number
4.TOTAL RECORDS display the nn editable text with total number of
records.
5. the GO button when clicked must take me to the page provided by user
in the TEXTBOX.

I hope you got my problem.if not please ask me ,i can elaborete more on
it
kindly help me
thnkx
cheers

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button