Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Client side javascript from Template Column datagrid
Message
From
19/12/2003 08:57:25
Vicki Miles
Vlm International, Inc.
Mishawaka, Indiana, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00860387
Message ID:
00860648
Views:
12
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform