Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2005, 11:10 AM
Authorized User
 
Join Date: Oct 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default OnEditCommand of DataGrid does not fire

Hi all,

I have a weir problem with dataGrid. I using the same technique for different project but this one does not work. The function that bind to OnEditCommand is never fired. Pelase help.


John

<asp:DataGrid ID="SearchList"
    Runat="Server" Width="100%"
    AutoGenerateColumns="false"
    AlternatingItemStyle-BackColor="#DCDCDC"
    OnEditCommand="SearchList_GetRecord">
    <Columns>
        <asp:BoundColumn HeaderText="Heat Code" DataField="Heat_code"></asp:BoundColumn>
        <asp:BoundColumn HeaderText="Carbon Equiv" DataField="CARBON_EQUIV"></asp:BoundColumn>
        <asp:EditCommandColumn ButtonType="LinkButton" EditText="Edit" UpdateText="UpDate" CancelText="Cancel"></asp:EditCommandColumn>
    </Columns>
</asp:DataGrid>

on my .cs file,

// This function never fire when I click on the edit link. Why??????

protected void SearchList_GetRecord(object sender, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
    string a = e.Item.Cells[1].Text;


}

 
Old February 1st, 2005, 02:55 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What do you mean when you say it doesn't fire? Are you not seeing the result of the code that you expect to run?

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
dropdownlist1_selectedindexchanged doesn't fire rsearing ASP.NET 1.0 and 1.1 Basics 2 February 14th, 2007 01:44 PM
How to fire events from datagrid cell? param99 ASP.NET 1.0 and 1.1 Professional 2 November 15th, 2006 07:33 AM
Help My house on Fire Matthew Access VBA 9 November 30th, 2005 03:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.