Hi,
I have a button column placed on a datagrid at design time that is
captioned "Delete". When the user clicks the button, I want to display
a confirmation message, that they want to delete that record in the
grid. I've pasted my code below. I'm not getting an error, but the code
is being ignored.
Private Sub dgrdNote_ItemDa taBound(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.Data GridItemEventAr gs) Handles
dgrdNote.ItemDa taBound
' Variables
Dim oBtn As New System.Web.UI.W ebControls.Butt on()
Dim i As Integer
Dim oCtl As System.Web.UI.C ontrol
i = e.Item.ItemInde x
If e.Item.ItemType <> ListItemType.He ader And
e.Item.ItemType <> ListItemType.Fo oter Then
oBtn = e.Item.Cells(7) .Controls(0)
oBtn.Attributes .Add("onclick", "return confirm
alert('Delete Note ID: ' & idNote & '?'));")
End If
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!