T
tshad
How do I get the DataGrid ID that called the OnAttachScript?
Sub OnAttachScript(sender as Object, e as DataGridItemEventArgs)
if e.Item.ItemType = ListItemType.ITem Or _
e.Item.ItemType = ListItemType.AlternatingItem then
Dim oImageButton as ImageButton =
CType(e.Item.FindControl("DeleteButton"), ImageButton)
oImageButton.Attributes.Add ("onClick","Javascript:return confirm('Are
you sure you want to delete this item?');")
end if
end Sub
<aspataGrid
Visible=true
AllowSorting="false"
OnItemDataBound="OnAttachScript"
AutoGenerateColumns="false"
CellPadding="0"
CellSpacing="0"
ID="InProgressGrid"
....
Thanks,
Tom
Sub OnAttachScript(sender as Object, e as DataGridItemEventArgs)
if e.Item.ItemType = ListItemType.ITem Or _
e.Item.ItemType = ListItemType.AlternatingItem then
Dim oImageButton as ImageButton =
CType(e.Item.FindControl("DeleteButton"), ImageButton)
oImageButton.Attributes.Add ("onClick","Javascript:return confirm('Are
you sure you want to delete this item?');")
end if
end Sub
<aspataGrid
Visible=true
AllowSorting="false"
OnItemDataBound="OnAttachScript"
AutoGenerateColumns="false"
CellPadding="0"
CellSpacing="0"
ID="InProgressGrid"
....
Thanks,
Tom