Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > datagrid's itemcommand event gets fired

Reply
Thread Tools

datagrid's itemcommand event gets fired

 
 
Manick
Guest
Posts: n/a
 
      10-24-2005
Can someone help me why is the following behaviour -
0. The page has a resultsGrid(datagrid) and a submit button.
1. On clicking any control within datagrid, resultsGrid_ItemDataBound is
fired.
2. User click's back button of the browser.
3. User clicks on a submit button outside the datagrid.
4. resultsGrid_ItemDataBound is also gets fired along with submit button
click event handler.

The requirement at 4. is, resultsGrid_ItemDataBound is not suppose to be
called.
 
Reply With Quote
 
 
 
 
Manick
Guest
Posts: n/a
 
      10-25-2005
event handler for submit button is a separate method. The surprise is both
resultsGrid_ItemCommand and Submit1_Click are executed at step 4.

"Alvin Bruney - ASP.NET MVP" wrote:

> how is the event handler wired up? to which event is it mapped?
>
> --
> Regards,
> Alvin Bruney [MVP ASP.NET]
>
> [Shameless Author plug]
> The Microsoft Office Web Components Black Book with .NET
> Now Available @ www.lulu.com/owc
> Forth-coming VSTO.NET - Wrox/Wiley 2006
> -------------------------------------------------------
>
>
>
> "Manick" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Can someone help me why is the following behaviour -
> > 0. The page has a resultsGrid(datagrid) and a submit button.
> > 1. On clicking any control within datagrid, resultsGrid_ItemCommand is
> > fired.
> > 2. User click's back button of the browser.
> > 3. User clicks on a submit button outside the datagrid.
> > 4. resultsGrid_ItemCommand is also gets fired along with submit button
> > click event handler.
> >
> > The requirement at 4. is, resultsGrid_ItemCommand is not suppose to be
> > called.

>
>
>

 
Reply With Quote
 
 
 
 
Ben
Guest
Posts: n/a
 
      10-25-2005

just a thought....check your page_load and see if ur binding the
datagrid on all page loads or only intial one(if (!page.ispostback)).


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Only every second fired event gets through to the handler K Viltersten ASP .Net 0 08-22-2009 07:05 PM
Embedded <divs> with events: How to prevent the parent div's eventfrom being fired when the embedded div's event is fired? Num GG Javascript 2 11-17-2008 08:56 PM
ItemCommand not fired with LoadTemplate Vishal ASP .Net Datagrid Control 0 02-22-2005 06:00 PM
event from dynamically loaded usercontrol gets fired once for 2 clicks Dan ASP .Net 0 11-16-2004 03:22 PM
Re: why datagrid's itemcommand event fired when I press ENTER key in a TextBox Natty Gur ASP .Net 0 06-30-2003 05:39 AM



Advertisments