Sub DataGrid1_itemdatabase (Byval e as system.web.ui.webcontrols.dataGriditeMeventArgs)
If E.Item.ItemType = ListItemType.Item OR_
E.Item.itemType = ListitemType.alternatingItem THEN
'------------------------------------- -
'Add the onmouseover and onmouseout method to the rotory
'------------------------------------- -
E.Item.attributes.add ("onmouseover", "this.style.BackgroundColor = 'Silver'")
E.Item.attributes.add ("onmouseout", "this.style.backcoldcolor = 'white'")
END IF
End Sub
Sub DataGrid2_ItemDatabase (byval e as system.web.ui.webcontrols.DataGriditeMeventArgs)
If E.Item.ItemType = ListItemType.Item OR_
E.Item.itemType = ListitemType.alternatingItem THEN
'------------------------------------- -
'Add the onmouseover and onmouseout Method a cell (column) of dataGrid
'------------------------------------- -
E.Item.cells (1) .attributes.add ("onmouseover", "this.style.backroundcolor = '# ddeeff'")
E.Item.cells (1) .attributes.add ("onmouseout", "this.style.backcoldcolor = 'white'")
'------------------------------------- -
'Change The Mouse Cursor of a Particular Cell (Column) of DataGrid
'(Or you may do it for a whole row of data ")
'------------------------------------- -
E.Item.cells (3) .style ("cursoor") = "hand"
'------------------------------------- -
'Add the onclick alert messagebox to a particular cell (column) of datagrid
'------------------------------------- --e.Item.cells (3) .attributes.add ("onclick", "Alert ('You Click At ID:" & E.Item.cells (0) .text & ");")
END IF
End Sub