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 11:19 PM.

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57