Results 1 to 2 of 2

Thread: Get URL Link from other column

  1. #1

    Thread Starter
    Hyperactive Member vbzero's Avatar
    Join Date
    Aug 2000
    Location
    Vienna
    Posts
    347

    Question Get URL Link from other column

    the picture shows the datagrid that is already bound to
    the database.

    the problem is:

    when I click the link, the button cloumn item should
    return the thread id from the thread id column.

    when I click the link, the controls fires the
    <b>'DataGrid_ItemCommand'</b> event.

    from there I can read the index from the item and/or
    its command name.

    but this doesn't help. I need the name from the thread id
    column.

    any ideas? thx!
    Attached Images Attached Images  

  2. #2
    Addicted Member Dmyze's Avatar
    Join Date
    Mar 2002
    Location
    Seattle
    Posts
    160
    I'm not sure if this will answer you question but here is a sample Datagrild ItemCommand Rountine I use:

    VB Code:
    1. Private Sub dgTerms_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles dgTerms.ItemCommand
    2.  
    3.     Select Case e.CommandSource.text
    4.       Case "Delete"
    5.  
    6.         Dim cn As ADODB.Connection
    7.         Dim sSQL As String
    8.  
    9.         sSQL = "DELETE From tblBaseRent Where ID = " & e.Item.Cells(10).Text
    10.  
    11.         cn = New ADODB.Connection()
    12.         cn.Open(Session("CN"))
    13.         cn.Execute(sSQL)
    14.         cn.Close()
    15.         BindData()
    16.  
    17.  
    18.     End Select
    19.  
    20.   End Sub
    -Daryl
    "Two More Rolls of Duct tape, and the world is mine!"
    VB.NET Guru

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width