Re: Grid Control ItemData event not firing

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: SStory (TheStorys_at_TAKEOUTTHISSPAMBUSTERsofthome.net)
Date: 05/13/04


Date: Wed, 12 May 2004 22:07:45 -0500

Hi Ken,

I wrote you before from a different machine, thus the HandA

Anyhow,

Here is the code..

'at the top
Protected WithEvents grdRepInvoices As System.Web.UI.WebControls.DataGrid

'then the event code
Private Sub grdRepInvoices_ItemCommand(ByVal source As Object, ByVal e As
system.Web.UI.WebControls.DataGridCommandEventArgs) Handles
grdRepInvoices.ItemCommand
    Response.Write("got here")
    Response.End()
end sub

Like I said, I use the same code in several pages but for some reason this
appears to never fire.
I am dumbfounded and looking for some obvious dumb mistake but can't see it
yet.

Thanks,

Shane

"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
news:OqwF76FOEHA.2952@TK2MSFTNGP12.phx.gbl...
> Could you post the code that isn't working? The event handler should look
> like this:
>
> Private Sub DataGrid1_ItemDataBound _
> (ByVal sender As Object, _
> ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) _
> Handles DataGrid1.ItemDataBound
> ' Your code goes here
> End Sub
>
> VS.NET used to play tricks by removing the Handles clause.
>
>
> "HandA" <nospam@nospam.com> wrote in message
> news:eg4c00FOEHA.128@TK2MSFTNGP12.phx.gbl...
> >I have a grid control on a page that I copied from another page and
> > modified.
> > For some reason it seem my ItemData event never fires.
> >
> > I even put a break point in it and it doesn't get there.
> > I tried response.write and response.end in that event and it doesn't
> > output
> > anything.
> >
> > Any ideas?
> >
> > Thanks
> >
> >
> >
>



Relevant Pages

  • Re: Afterupdate event
    ... I managed to solve my problem by using the beforeupdate event and modifying ... Private Sub Form_BeforeUpdate ... place your code in the AfterUpdate event of an appropriate text control. ... So I shifted it to the afterupdate event but as I say doesn't fire. ...
    (microsoft.public.access.formscoding)
  • Re: Afterupdate event
    ... Private Sub Form_BeforeUpdate ... The Form AfterUpdate and BeforeUpdate event only fires when the form is Updated. ... So I shifted it to the afterupdate event but as I say doesn't fire. ...
    (microsoft.public.access.formscoding)
  • Re: Return Fire
    ... Torp uses mobility. ... I've never used fire from a sub but I ... But they can't attack subs... ...
    (rec.games.empire)
  • Re: Giving Notice (to a band)
    ... Yeah, and the reason it's better is because you have NOTHING invested in it, ... I'd also like to comment on the "sub" thing - if this parting is less than ... What I would do is play out the final gigs as professionally as possible, ... Check out my band, West Eats Meat http://www.myspace.com/westeatsmeat ...
    (alt.guitar.bass)
  • Re: Need help updating access db
    ... use parameters instead...this is a big potential risk ... will ever fire... ... command, added to fire the insert command and deleted to fire the delete ... > Sub Page_Load ...
    (microsoft.public.dotnet.general)