| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| C-Sharp Programming Post questions, answers, and comments about C#. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Bubble event doesn't work everytime
Hello, guys.
Have a problem. Say, I have a handler from grid, that should bubble an event to the top conrols: protected void grdCounterOffers_RemoveItemCommand(object sender, GridCommandEventArgs e) { base.RaiseBubbleEvent(sender, (EventArgs)e); } The GridCommandEventArgs is inherited from CommanEventArgs, and I need this class to have the ID of the item to be removed from grid. Whenever I pass the e, which is not null, the handler on the top control is not called. If I pass null, it's called. Can you please explain me why? And how can I correctly pass the desired parameter in the args to the top controls? |
|
#2
|
||||
|
||||
|
Re: Bubble event doesn't work everytime
Code:
protected void grdCounterOffers_RemoveItemCommand(object sender, GridCommandEventArgs e)
{
base.RaiseBubbleEvent(sender, (EventArgs)e);
}
Is it really EventArgs or is it another Type ?
__________________
Jonny PoetTo be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. ! ![]() Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code] If anyone felt he has got help, show it in rating the post. Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ? My latest articles : Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 |
|
#3
|
|||
|
|||
|
Re: Bubble event doesn't work everytime
Quote:
public class GridCommandEventArgs : CommandEventArgs public class CommandEventArgs : EventArgs When I used reflector, I noticed, that there're no dependance from passed argument type. One more thing: the event is fired from the control, which is located in a repeater on another control, and should be handled in that top control. Last edited by Takhir; October 15th, 2009 at 01:34 PM. |
|
#4
|
||||
|
||||
|
Re: Bubble event doesn't work everytime
Quote:
Have you already looked if grdCounterOffers_RemoveItemCommand is ever called so it is able to fire the event in the baseclass ?
__________________
Jonny PoetTo be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. ! ![]() Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code] If anyone felt he has got help, show it in rating the post. Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ? My latest articles : Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7 |
|
#5
|
|||
|
|||
|
Re: Bubble event doesn't work everytime
Quote:
|
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|