[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

rusha

2/13/2004 2:53:00 PM

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);

}
1 Answer

Teemu Keiski

2/13/2004 5:15:00 PM

0

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

"Rush" <rusha@data-tech.com> wrote in message
news:9c4a6c75.0402130652.613cbd6e@posting.google.com...
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);

}