Change the style of DataGrid row
-
Hi there.. How can i change the DataGrid row color and style when i click this row? VS.NET\VB.NET
-
Hi there.. How can i change the DataGrid row color and style when i click this row? VS.NET\VB.NET
To change datagrid row color, use this code
Protected Sub DataGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid.ItemCreated
e.Item.Attributes.Add("Onclick", "this.style.backgroundColor = 'lightblue';")
End Sub -
Hi there.. How can i change the DataGrid row color and style when i click this row? VS.NET\VB.NET
-
To change datagrid row color, use this code
Protected Sub DataGrid_ItemCreated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles DataGrid.ItemCreated
e.Item.Attributes.Add("Onclick", "this.style.backgroundColor = 'lightblue';")
End SubThanx :-D