Ver Mensaje Individual
  #6 (permalink)  
Antiguo 20/10/2009, 07:39
skel363
 
Fecha de Ingreso: febrero-2003
Ubicación: chile
Mensajes: 101
Antigüedad: 22 años
Puntos: 1
Respuesta: seleccionar una fila de un datagridview con un click

Creo que algo mas sencillo es agregarle una línea al evento RowCommand de la grilla algo asi

Código:
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
        ' FORMATEA ROWS
        If e.Row.RowType = DataControlRowType.Pager Then
            'bla bla bla
        ElseIf e.Row.RowType = DataControlRowType.DataRow Then
            ' APLICA ESTILOS A EVENTOS ON MOUSE OVER Y OUT
            e.Row.Attributes.Add("OnMouseOut", "this.className = this.orignalclassName;")
            e.Row.Attributes.Add("OnMouseOver", "this.orignalclassName = this.className;this.className = 'altoverow';")
'este es el atributio que hace marcar la fila	
            e.Row.Attributes("OnClick") = Page.ClientScript.GetPostBackClientHyperlink(Me.GridView1, "Select$" + e.Row.RowIndex.ToString)
        End If
    End Sub
__________________
s[K]eL