DataList Events Not Firing!!!

R

Rush

Can anyone tell me why events in my EditItemTemplate are not firing?
I'm not getting UpdateCommand, CancelCommand, DeleteCommand. I see
posts going back to 2001 concerning this. Has this been fixed? I'm
running Dev Studio v7, .NET Framework v1.0. ASP.NET w/ C# CodeBehind.

The events from the ItemTemplate run fine. The EditItemTemplate
ListButtons are wired up exactly the same way. The OnInit() is firing
as is the InitializeComponent()

override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.DataList1.ItemCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_ItemCommand);
this.DataList1.CancelCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_CancelCommand);
this.DataList1.EditCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_EditCommand);
this.DataList1.UpdateCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_UpdateCommand);
this.DataList1.DeleteCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_DeleteCommand);
this.DataList1.SelectedIndexChanged += new
System.EventHandler(this.DataList1_SelectedIndexChanged);
this.Load += new System.EventHandler(this.Page_Load);

}
 
T

Teemu Keiski

What is happening in the Page_Load? You aren't accidentally rebinding the
grid on postback? Post some more code to demonstrate.

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

Can anyone tell me why events in my EditItemTemplate are not firing?
I'm not getting UpdateCommand, CancelCommand, DeleteCommand. I see
posts going back to 2001 concerning this. Has this been fixed? I'm
running Dev Studio v7, .NET Framework v1.0. ASP.NET w/ C# CodeBehind.

The events from the ItemTemplate run fine. The EditItemTemplate
ListButtons are wired up exactly the same way. The OnInit() is firing
as is the InitializeComponent()

override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.DataList1.ItemCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_ItemCommand);
this.DataList1.CancelCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_CancelCommand);
this.DataList1.EditCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_EditCommand);
this.DataList1.UpdateCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_UpdateCommand);
this.DataList1.DeleteCommand += new
System.Web.UI.WebControls.DataListCommandEventHandler(this.DataList1_DeleteCommand);
this.DataList1.SelectedIndexChanged += new
System.EventHandler(this.DataList1_SelectedIndexChanged);
this.Load += new System.EventHandler(this.Page_Load);

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top