|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
datagrid pagingI 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? 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 quoteHide 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? > > > 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 quoteHide 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? > > > > > >
Other interesting topics
Flash Movie (.swf) does not work on localhost
Basics of Forma Layout Client Validation (JavaScript) for CustomValidator Control Eliminate postback effect? Long Running Process VS 2003 and 2005 on same machine GridView DataKey Authentication in Asp.Net 2.0 Theme and Master Page Problem with images in VS2005 |
|||||||||||||||||||||||