Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Datagrid Control (http://www.velocityreviews.com/forums/f60-asp-net-datagrid-control.html)
-   -   DataList with linkbuttons (http://www.velocityreviews.com/forums/t760989-datalist-with-linkbuttons.html)

Ugo 08-18-2004 01:23 PM

DataList with linkbuttons
 
Can anyone help?
I have a DataList with 5 LinkButtons and for some reason my Item_Command
event does not get
triggered. My code is as follows:

private void dlColorDetail_ItemDataBound(object sender,
DataListItemEventArgs e)

{

if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)

{

InfoStyleColorDetails color = (InfoStyleColorDetails) e.Item.DataItem;

e.Item.ID= Convert.ToString(color.SKU);





System.Web.UI.WebControls.LinkButton lbEvent = new
System.Web.UI.WebControls.LinkButton();

lbEvent.Text= Convert.ToString(color.SKU);

e.Item.Controls.Add(lbEvent);

lbEvent.Click += new System.EventHandler(LinkButton1_Click);



}




All times are GMT. The time now is 04:38 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.