Ver Mensaje Individual
  #5 (permalink)  
Antiguo 26/11/2004, 15:06
Avatar de splinter
splinter
 
Fecha de Ingreso: junio-2004
Ubicación: Misantla,Ver.Mexico
Mensajes: 181
Antigüedad: 19 años, 10 meses
Puntos: 0
OK, usando un boton de update, el grid se activa para edicion. Tratare de explicarme con este ejemplo, donde el grid contiene una lista y un control textbox


'EVENTO DEL GRID PARA ACTUALIZAR (UPDATE)
Private Sub GridDatos_UpdateCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles GridDatos.UpdateCommand
Dim value1 As String
Dim ValLista as string
'AQUI SE OBTIENE EL VALOR DEL CONTROL TEXTBOX
value1 = (CType(e.Item.FindControl("txtValueID"), TextBox).Text)
'AQUI SE OBTIENE EL VALOR DEL ELEMENTO LA LISTA SELECCIONADA,
'SE BUSCA EN LA COLUMNA(10) EL VALOR DEL ELEMENTO DEL CONTROL ("LstRC") QUE ES UNA LISTA, SE CONVIERTE AL TIPO LISTA Y SE OBTIENE SU VALOR (SELECTVALUE)

ValLista = CType(GridDatos.SelectedItem.Cells(10).FindControl
("LstRC"), DropDownList).SelectedValue

'...sentencias

End Sub

Última edición por splinter; 26/11/2004 a las 15:07