Implementing paging in DataGrid is quite simple, but if you use a page number paging, you will not know the page number of the current page, which will be troublesome. There are a lot of solutions, which mainly tells how to add the current page number.
Simply add the following code in the DataGrid1_itemcreated event:
Private void DataGrid1_itemcreated (object sender, system.web.ui.webcontrols.dataGriditeMEventAndargs e) {listiteMTYPE ELEMTYPE = E.Item.ItemType;
IF (ELMTYPE == ListItemType.pager) {Tablecell Pager = (TableCell) E.Item.controls [0];
For (int i = 0; i ";}}}}