Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/03/2005, 10:02
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años, 1 mes
Puntos: 50
En tu imagebutton pedes agregarle la propiedad CommandName para enlazarlo al evento ItemComman del grid y con ello obtener el valor que necesitas.. ejemplo.

Cita:
<asp:DataGrid id="DataGrid1" runat="server".....>
...
....
<asp:TemplateColumn>
<ItemTemplate>
<asp:ImageButton CommandName="Obtener" Runat=server ImageUrl="image.gif"></asp:ImageButton>
</ItemTemplate>
...
..
Y en el codebehind.. pondrías ésto:

Cita:
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles DataGrid1.ItemCommand
If e.CommandName = "Obtener" Then
Dim s As String = e.Item.Cells(0).Text
'Aqui haces lo que quieras con ese campo
End If
End Sub
Espero que sea lo que buscas..

Salu2
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net