Retrieve cell text in datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • .net_developer
    New Member
    • Jul 2006
    • 3

    #1

    Retrieve cell text in datagrid

    Hi

    I have a datagrid that has the following fields..

    1.Document Title - Bound Column
    2.Document Date-Bound Column
    3.Save to Computer- Template Column-Link Button

    I need to retrieve the document title when the corresponding linkbutton is clicked.

    This is how it looks.

    Ex.txt 8/2/2006 Save to Computer
    jer.jpg 8/2/2006 Save to Computer

    Any Ideas?

    Thanks
    Developer
  • henkhell
    New Member
    • Aug 2006
    • 2

    #2
    hello try this
    Private Sub DataGrid1_ItemC ommand(ByVal source As Object, ByVal e As System.Web.UI.W ebControls.Data GridCommandEven tArgs) Handles DataGrid1.ItemC ommand
    If e.CommandName = "hello" Then
    Dim srrrr As String
    srrrr = e.Item.Cells(2) .Text
    End If
    End Sub


    hello is the string that you put on the command inside the datagrid.
    i hope that help you.



    Originally posted by .net_developer
    Hi

    I have a datagrid that has the following fields..

    1.Document Title - Bound Column
    2.Document Date-Bound Column
    3.Save to Computer- Template Column-Link Button

    I need to retrieve the document title when the corresponding linkbutton is clicked.

    This is how it looks.

    Ex.txt 8/2/2006 Save to Computer
    jer.jpg 8/2/2006 Save to Computer

    Any Ideas?

    Thanks
    Developer

    Comment

    Working...