473,616 Members | 2,970 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

EditCommandColu mn

Consider the following DataGrid:

<asp:DataGrid ID="dgCart" OnEditCommand=" Cart_EditComman d"
OnItemCommand=" Cart_ItemComman d"....AllowSort ing=true....... .>

<Columns>

<asp:TemplateCo lumn>
<HeaderTemplate >
<asp:LinkButt on ID="lnkProdID" CommandArgument ="ProdID"... ../>
</HeaderTemplate>
<ItemTemplate >
............
</ItemTemplate>

<%-- A few more TemplateColumns as shown above come here --%>

<asp:EditComman dColumn EditText="EDIT"/>

</Columns>

</asp:DateGrid>

If I am not mistaken, when any Button within the DataGrid other than
the EDIT Button is clicked, the ItemCommand event gets raised & when
the EDIT Button is clicked, ONLY the EditCommand event gets raised;
the ItemCommand event doesn't get fired when the EDIT Button is
clicked..

But what I find is when I click the EDIT Button, first the ItemCommand
event fires & then the EditCommand event fires!

What I would like to know is when the EDIT Button is clicked, does the
ItemCommand event also get raised along with the EditCommand event?
Note that the Headers are LinkButtons for which the ItemCommand is
included within the DataGrid tag.

Mar 14 '07 #1
0 1036

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
1430
by: Stanley J Mroczek | last post by:
I Set the EditCommandColumn to Visible=False to stop people who are not allowed to make any changes to a record. How can set it to Visible=true for some users? Please answer in VB Thanks Stan
4
2561
by: RobS | last post by:
Can anyone answer this question: How can I disable validation when edit column update button is pressed. Can it be done for the whole grid? Regards, Robert
1
4311
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls (watch the layout, some have child controls):
1
1702
by: George Durzi | last post by:
I have an editcommandcolumn in my datagrid, as follows. <asp:editcommandcolumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"> I'd like to set the CausesValidation property of the Update portion to false. Can't seem to get it to work. The Edit and Cancel linkbuttons have CausesValidation turned off by default. That cell in that row of my datagrid is being rendered in my trace, as follows
1
1806
by: angus | last post by:
Dear All, I am using VB.net It is found that the <asp:EditCommandColumn/> wouldn't fired an event for OnEditCommand If pushbutton has been used: that is:
0
1212
by: tshad | last post by:
I have a table which works fine using the following templates: ********************************************************************************** <asp:TemplateColumn HeaderText="Answer"> <ItemTemplate> <asp:Label id="lblAnswer" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Answer") %>'> </asp:Label> </ItemTemplate> <FooterTemplate> <asp:TextBox id="txtAnswer" runat="server"></asp:TextBox>
4
1973
by: Sourav Dutta Gupta | last post by:
I want to change the "scr" like src='images/Edit.ICO' to src='images/XYZ.ICO' dynamically based on some condition. My EditCommandColumn: <asp:EditCommandColumn ButtonType="LinkButton" UpdateText="<img alt='Save' src='images/Save.ICO' height=20 width=20 border=0>" CancelText="<img alt='Cancel' src='images/Cancel.ICO' height=20 width=20 border=0>" EditText="<img alt='Save' src='images/Edit.ICO' height=20 width=20 border=0>"...
0
1231
by: slemen | last post by:
Hi, The DataGrid aps:EditCommandColumn when used with column templates created programmatically does not trigger the _Edit subroutine in code. The ASP:Datagrid definition is below (1), the _Edit subroutine signature (2) is below that and the column template class is (3). Thank you for your help, Scott
0
1298
by: slemen | last post by:
Hi, The asp:EditCommandColumn template does not fire the _edit sutboutine when the edit command column buttons are clicked. I get a Page Cannot Be Displayed page error instead. My (ASP 1.1) datagrid is defined in the HTML and the HTML <columns> has one defined template column and it is an asp:EditCommandColumn (with edit buttons). The datagrid's other columns are added at runtime by using the technique documented in the MSDN article:
0
1023
by: Ian | last post by:
Hi I have used the following code to essentially late bind an EditCommandColumn to my datagrid in ASP.NET. EditCommandColumn ec = new EditCommandColumn(); ec.ButtonType = ButtonColumnType.PushButton; ec.CancelText = "Cancel"; ec.EditText = "Edit"; ec.HeaderText = "Rename";
0
8146
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8297
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6097
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4063
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4141
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1445
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.