datagrid paging

N

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?
 
G

Guest

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);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top