473,473 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

datagrid paging

NuB
I have a datagrid that I need to allow the user to page and sort as well.

first, paging

I need to show the pages in the footer of the grid like this

Page 1, 2, 3, 4, 5, .etc and then in the right hand corner of the footer i
need to show
the number of records such as this
Total Cars in inventory: 200

Then I need a button (or link) to allow the user to view all the records
instead of paging them
how can i do all of this and add the text in the footer of the grid?
Dec 16 '05 #1
2 2059
For datagrid pagination, please look at following url:

http://msdn.microsoft.com/library/de...WebControl.asp

And following code snippet (in datagrid_ItenCreated event) shows how to add
message in datagrid pager

HTH

Elton Wang
"NuB" wrote:
I have a datagrid that I need to allow the user to page and sort as well.

first, paging

I need to show the pages in the footer of the grid like this

Page 1, 2, 3, 4, 5, .etc and then in the right hand corner of the footer i
need to show
the number of records such as this
Total Cars in inventory: 200

Then I need a button (or link) to allow the user to view all the records
instead of paging them
how can i do all of this and add the text in the footer of the grid?

Dec 16 '05 #2
I missed following code:

if (e.Item.ItemType == ListItemType.Pager)
{
e.Item.Cells[0].ColumnSpan = e.Item.Cells[0].ColumnSpan -1;
TableCell cell = new TableCell();
cell.Text = "Total Cars in inventory: " + numberOfCars ;
cell.HorizontalAlign = HorizontalAlign.Right;
e.Item.Cells.Add(cell);

}

"Elton W" wrote:
For datagrid pagination, please look at following url:

http://msdn.microsoft.com/library/de...WebControl.asp

And following code snippet (in datagrid_ItenCreated event) shows how to add
message in datagrid pager

HTH

Elton Wang
"NuB" wrote:
I have a datagrid that I need to allow the user to page and sort as well.

first, paging

I need to show the pages in the footer of the grid like this

Page 1, 2, 3, 4, 5, .etc and then in the right hand corner of the footer i
need to show
the number of records such as this
Total Cars in inventory: 200

Then I need a button (or link) to allow the user to view all the records
instead of paging them
how can i do all of this and add the text in the footer of the grid?

Dec 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RelaxoRy | last post by:
sqlConnection1.Open(); myReader = sqlCommand1.ExecuteReader(); DataGrid1.DataSource = myReader; DataGrid1.DataBind(); myReader.Close(); sqlConnection1.Close(); The Datagrid populates fine. ...
3
by: Joseph D. DeJohn | last post by:
I am trying to get pagination working on a datagrid. Can anyone point me to a resource for help on this? I'm not sure if custom paging is the best option or not.
2
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
2
by: RJN | last post by:
Hi Sorry for posting again. I have a datagrid which is put inside a div tag to make it scrollable. I need to page the datagrid. The page numbers appear at the bottom of the datagrid and has...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
5
by: quanga | last post by:
Hi- I have a datagrid that in some cases can be several thousand rows in length. What I'd like it to do is have the data pushed to the browser after every, say, 100 rows or so. Kind of a...
2
by: Axel Dahmen | last post by:
Hi, I'm using a DataGrid control to show a table's content with paging. For navigation through the pages I'm using the DataGrid's intrinsic navigation section. My problem: The DataGrid...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
0
by: Pat | last post by:
I have 3 Datagrid nested. Master Details Child The master has paging (And i'm using the paging inbuilt in the Datagrid) in the Master DataGrid you select a linkbutton(using commandname) and it...
3
by: Pat | last post by:
I have a 2 nested Datagrid. When i select a row in the Master Datagrid i populate the Child databrid using myDataGrid.SelectedIndex value as the filter and setting the DataKeyField. I enabled...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.