View Single Post
Old August 29th, 2006, 06:19 PM
dparsons dparsons is offline
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

Have you stepped through the code?

Are the link buttons in an EditCommandColumn?
If so:
In the datagrid, have you set the OnEditCommand, OnUpdateCommand?

If these are just buttons contained in a datagrid, and you need to wire up some functionality to them, in your case, a redirect you could do something like this:

    Private Sub dgItemBound(ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles dgRec.ItemDataBound
        Dim lb As LinkButton
        If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
            lb = CType(e.Item.Cells(0).FindControl("lbDelete"), LinkButton)
            lb.Attributes.Add("onClick", "return getconfirm();")
        End If

    End Sub

Then each link button will trigger the getconfirm function when it is clicked.


"The one language all programmers understand is profanity."