ASP.NET makes selected page numbers in DataGrid

xiaoxiao2021-03-06  17

It turned out to be easy, set a attribute to OK, then discover still to write code! The code is as follows: DGSaleslist is the name of the DataGrid, the following code can be used as used, just modify the name of the DataGrid is OK, Private Void DGSaleslist_ItemCreated (Object) Sender, system.web.ui.webcontrols.dataGriditeMeventargs e) {/ * will be selected, becoming highlighted color * / if (E.Item.itemType == ListItemType.Pager) {Label_Labpage;

Tablecell Pager = (TableCell) E.Item.controls [0];

For (int i = 0; i

IF (obj is label) {_Labpage = (label) OBJ;

_LabPage.ForeColor = color.red; // Color highlights as red, can be modified as needed}}}

}} The easiest way: see the reply behind this article!

AIMAR published in

2005-02-24 8:00 PM

gosh!

You can use a pattern of code, you have to write so much! !

------------