473,652 Members | 3,123 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GridView.RowCom mand Event fires twice

I have discovered a( nd its probably not news to most of you ) that if you
add a button column and use the Image Button type that this event fires
twice. I know its been reported about a year ago, but I cant seem to find a
solution to it in terms of a fix, or explaination as to why.
Any ideas here ?
Sep 29 '07 #1
1 2851
I recently had a similar situation, although I don't think I was using
an ImageButton. I didn't have time to deal with it so I just set a
class variable to determine if the event has already fired.

I'd be interested in an explanation also.

-Mike Placentra II

On Sep 29, 2:16 pm, "Just Me" <news.microsoft .comwrote:
I have discovered a( nd its probably not news to most of you ) that if you
add a button column and use the Image Button type that this event fires
twice. I know its been reported about a year ago, but I cant seem to find a
solution to it in terms of a fix, or explaination as to why.

Any ideas here ?
Sep 29 '07 #2

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

Similar topics

28
10256
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when appropriate based on your method names . the GridView has OnRowCommand="GridView1_RowCommand" in the aspx. my problem is that the RowCommand event is firing twice (95% of the time) on the page. the other 5% it only fires once. there's no
9
24784
by: J055 | last post by:
Hi I have a very simple configuration of the GridView with paging and sorting. When I do a postback the DataBinding event fires twice - in both the ProcessPostData and PreRender stages of the page life cycle. In this example the event fires twice when a) GridView EnableViewState=False and any image type control in the <columns/> element. When either EnableViewState is set to true or the image button is removed, the event fires once....
3
8840
by: chelsea | last post by:
I am using a GridView control with a ButtonField and receiving 2 row command events for each click of the button. Is there a configuration switch that I can turn that will ensure I only receive one call to my handler? I'm using the most basic wiring as it comes out of VS 2005.. Thanks in advance for your help! ex/ <%@ Page Language="C#" AutoEventWireup="false" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
2
2181
by: luisxx | last post by:
WinSrv2003 SP1 IIS 6.0 ASP.NET C#, 2.0 SQL 2005 All on same machine Hello everyone! I have a method in ASP.NET 2.0 that I can't seem to get right, Gridview1_rowcommand.
6
28132
by: Kevin Attard | last post by:
I am using a GridView inside a UserControl which has a template column for deleting the rows. Before databinding the gridview i am attaching the RowCommand and RowDataBound event. I am using the RowDataBound event to set the commandargument of the delete button. The event is being fired and works fine. When I press the delete button, the RowCommand event is not firing! and neither is the RowDeleting (the button's commandName is...
3
11712
by: AG | last post by:
Below is code (slightly modified and converted to VB) that was provided to me in response to another post. I am using it to demonstrate another problem. In order for paging and other features to work properly in a gridview, viewstate must be enabled. So, in order to minimize the size of viewstate for a page, I will sometimes turn off viewstate for each control in template columns. That means that the gridview must be databound on each...
0
2566
by: slemen | last post by:
My GridView is bound in VB code to a DataTable. The RowUpdating event fires when the row's Update linkbutton is clicked and the row contains the old, pre-edited values (as is expected.) However, the RowUpdated event never fires. The debugger shows the Page_PreRender event fires immediately after the RowUpdating event fires. I tried calling the GridView's UpdateRow method from the RowCommand event and looking at the values afterward...
0
3159
by: jrnail23 | last post by:
I have a user control which contains an UpdatePanel, which contains a MultiView inside, with a GridView in one of the views. In my GridView, I have a ButtonField which is supposed to trigger a server-side operation, using the RowCommand functionality. In IE, this all works great, but in Firefox (v2.0.0.6), clicking the above mentioned ButtonField fires off two similar AJAX requests, which is causing errors in my server-side code. ...
3
7537
by: =?Utf-8?B?SlA=?= | last post by:
<asp:GridView ID="gridResults" runat="server" AutoGenerateColumns="False" Width="98%" PageSize="25" AllowPaging="True" OnSorting="gridResults_Sorting" OnPageIndexChanging ="gridResults_PageIndexChange" AllowSorting="True" OnRowDataBound="gridResults_RowDataBound" EnableViewState="False" OnRowCommand="gridResults_Command" ></asp:GridView> Inside a <ItemTemplateI have an <asp:ImageButton> The problem is that no matter what I do,...
0
8367
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8279
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,...
0
8703
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8467
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
8589
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
5619
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4145
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
4291
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1914
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.