View Single Post
Old 03-10-2006, 09:28 AM   #1 (permalink)
rikb53
Registered User
 
Join Date: Jan 2006
Posts: 29
rikb53 is on a distinguished road
Maintain State after postback

i can highlight a dataGrid row thru javascript or in the code behind with the OnItemDataBound Event of the grid.
and yes it highlights, and then goes away on Postback. anyway to make it stick until say an event of maybe a button Click is fired.

Public Sub dtgCustomers_ItemDataBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
e.Item.Attributes.Add("onclick", "this.style.backgroundColor='Yellow'")
End If
End Sub

this works, then goes away on postback
anyideas how to maintain this state????
thanks
rik
rikb53 is offline   Reply With Quote