Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > DataList with linkbuttons

Reply
Thread Tools

DataList with linkbuttons

 
 
Ugo
Guest
Posts: n/a
 
      08-18-2004
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);



}


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM
Linkbuttons not working Stefan Landgraf ASP .Net 0 12-11-2003 01:18 PM
LoadPostData and LinkButtons Lucas Tam ASP .Net 0 08-18-2003 12:57 PM
Re: LinkButtons and MouseOver Vidar Petursson ASP .Net 1 07-09-2003 07:10 AM
Re: Dynamic Table with Dynamic LinkButtons Rick Glos ASP .Net 0 07-08-2003 01:09 PM



Advertisments