Re: DataGrid does not recognize Select, Edit, etc buttons when EnableViewState = False

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Paul (dotPaul_at_paulNOSPAMMERleblanc.net)
Date: 03/24/04


Date: Wed, 24 Mar 2004 10:00:12 -0800

Jose, I've had this happen to me and I've seen a lot of posts
complaining about similar issues. I don't remember ever seeing an
"official" sounding answer to it but all of a sudden certain framework
generated event handlers have been known to quit. They never fire after
something whacks them (but what whacks them?)

I work in VB and I've solved the problem by deleting the handlers, and
then reselecting them from the dropdownlists at the top of the code
behind. In VB this is relatively simple, and more a pain in the butt
than anything else. Of course, then I paste my code back into the
handlers. It has always worked to clear up the problem. The problem
has recurred on me about 3 times in the last eight months. Each time I
find it a little easier to recognize the issue, but the first time was a
bitch. HUH??? WHA???
The event won't FIRE??

The only thing I can think of that could be seen as a "screwup" that
would lead to this is something that doesn't make sense: I would be
fiddling in the HTML of ASP.NET and screw it up and there would be
problems rendering the controls, etc. This happens all the time, of
course, and should have no bearing on the code behind. That's what my
logical mind says, but I'm not that experienced to know for sure. All I
know is that it's the only thing I can think of that would be something
I screwed up at such times.

IF you work in C# you may have to type the handlers back in manually
because I don't think it works the same as VB.

~Paul

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Can I create my own User events?
    ... For instance, if I execute a function, then I can write a line of code to execute my own specialized event. ... When the event source wants to fire the event, it calls the OnHappens with some arguments to be casted along with the event. ... The OnHappens function enumerates the handlers list and invokes each one with the appropriate set of arguments. ...
    (microsoft.public.scripting.jscript)
  • Re: Button clicks and textbox Exit events
    ... "I'll call a sub to write data to the datasheet from the buttons' Click ... event handlers and write handlers for the textboxes' Enter events to do ... The Exit event handlers will simply send up a "Changed ... when VBA encountered this line in a textbox's Exit event ...
    (microsoft.public.excel.programming)
  • Re: Folding Editor
    ... Now I also understand why the Delphi IDE closes an edit window, ... containing the viewer component. ... More could be done in such handlers, ... in event handlers? ...
    (comp.lang.pascal.delphi.misc)
  • Re: Windows CE button press event handlers
    ... They're probably best handled as hot keys. ... I want to capture all the button press and wheel spin events ... and have event handlers for those. ... KeyUp and KeyDown event handlers in my c# code, ...
    (microsoft.public.windowsce.app.development)
  • Re: Trying again (MVP, please note): programmatically setting up event handlers
    ... I'm an expert programmer but an ... programmatically set up event handlers. ... up handlers for Controls in a Form. ...
    (microsoft.public.access.forms)