Cathi,
I can see now why I struggled without finding the answer. This would have taken me a long time to discover this on my own. Thanks for your help.
I've converted the technique to C# and included the following for anyone else who needs it in C#
private void grdPayments_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
Button myButton=(Button)e.Item.Cells[0].FindControl("btnDelete");
if (myButton != null)
{
myButton.Attributes.Add("onclick","alert('hello')");
}
}
I also changed the hyperlink to a button object.
Thanks again for increasing my understanding just a little bit more.