Here is two tips using DataGrid.
1. How to change the color of a certain in DataGrid
Private void DGD_Data_itemdatabase (Object sender, system.web.ui.webcontrols.dataGriditemeventArgs e) {if (E.Item.cells [0] .Text.trim (). Equals ("aw") {E.Item.cells [ 0]. Backcolor = system.drawing.color.red;}}
2. Modify the color when the mouse is placed on a certain
private void dgd_data_ItemDataBound (object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) {e.Item.Cells [0] .Attributes.Add ( "onmouseover", "this.style.backgroundColor = '# DDEEFF'"); }
III. How to display pictures in DataGrid
Add a templateColumn for DataGrid
Where PictureBox.aspx is a page that displays a picture.
Open a big window when you point the picture to display the picture
Function openimage (strcode) {var strurl = "../UTILITY/UTILITYPAGE/PICTUREBOX.ASPX?" strcode; window.open (Strull, 'Image', 'width = 775, height = 500, resizable = yes'); }