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