ASP.NET makes selected page numbers in DataGrid

xiaoxiao2021-03-06  41

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!

转载请注明原文地址:https://www.9cbs.com/read-55174.html

New Post(0)