Home All Groups Group Topic Archive Search About
Author
16 Dec 2005 5:43 PM
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?

Author
16 Dec 2005 9:13 PM
Elton W
For datagrid pagination, please look at following url:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskSpecifyingPagingBehaviorInDataGridWebControl.asp

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

HTH

Elton Wang


Show quote
"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?
>
>
>
Author
17 Dec 2005 5:27 PM
Elton W
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);

}



Show quote
"Elton W" wrote:

> For datagrid pagination, please look at following url:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskSpecifyingPagingBehaviorInDataGridWebControl.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?
> >
> >
> >

AddThis Social Bookmark Button