write this line
if the row is DataRow :
e.Row.Attributes["onclick"] = "javascript:showSelected();";
--------
function showSelected(currRow)
{
currRow.background.color = "";
}
Bixam.
On Mon, Feb 22, 2010 at 8:24 PM, Eder Sousa <[email protected]> wrote:
> I am trying to change the color of the row which was selected by the mouse
> on the gridview (VB.NET).
> I tried a lot of code and a resulted on thins:
>
> Protected Sub gvRestricaoDisponivel_RowDataBound(ByVal sender As Object,
> ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles
> gvRestricaoDisponivel.RowDataBound
> ' If ((e.Row.RowState And e.Row.RowType = DataControlRowType.DataRow) > 0)
> Then
> If (e.Row.RowState = DataControlRowState.Selected) Then
> e.Row.Cells(2).BackColor = Drawing.Color.Yellow
> End If
> ' End If
> End Sub
>
>
> But it does not work, pelase HELPPPPPP
>
> --
> Eder Sousa
> Technology Information
> [email protected]
> [email protected]
> [email protected]
>
>