Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Inherited datagrid does not sort with OnBubbleEvent

Reply
Thread Tools

Inherited datagrid does not sort with OnBubbleEvent

 
 
Pat
Guest
Posts: n/a
 
      09-15-2004
Hi all:

I have a custom datagrid that has a row of buttons in its header (it
serves as a toolbar).

I'm overriding the OnBubbleEvent to handle the clicks for these child
buttons.

However, when I override the OnBubbleEvent, the grid does not sort or
page! Any ideas?

Thanks:

Pat
 
Reply With Quote
 
 
 
 
Martin Dechev
Guest
Posts: n/a
 
      09-15-2004
Hi, Pat,

Did you call base.OnBubbleEvent (or in VB.NET MyBase.OnBubbleEvent)?
Moreover, you can check if the event was actually handled by the base class
implementation and execute your code only if it was not handled (not
recognized as sort, page, prev, next, select, delete, etc. command):

protected override bool OnBubbleEvent(object s, EventArgs e)
{
bool result = base.OnBubbleEvent(s, e);
if(result)
{
// the event was not for you - it was handled by the
// System.Web.UI.WebControls.DataGrid implementation
}
else
{
// ok, it's you now:
if(YourCondition)
{
// TODO: Your code
....
// mark that the event was handled by you:
result = true;
}
}
return result;
}

Greetings
Martin
"Pat" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi all:
>
> I have a custom datagrid that has a row of buttons in its header (it
> serves as a toolbar).
>
> I'm overriding the OnBubbleEvent to handle the clicks for these child
> buttons.
>
> However, when I override the OnBubbleEvent, the grid does not sort or
> page! Any ideas?
>
> Thanks:
>
> Pat



 
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
OnBubbleEvent firing when it's not suppose to Dan ASP .Net 5 11-16-2004 01:29 AM
How to set default to TRUE: Overrides Function OnBubbleEvent(ByVal source As Object, ByVal args As EventArgs) As Boolean? Andreas Klemt ASP .Net Building Controls 1 07-18-2003 01:03 PM
Re: How to set default to TRUE: Overrides Function OnBubbleEvent(ByVal source As Object, ByVal args As EventArgs) As Boolean? David Waz... ASP .Net 0 07-04-2003 07:32 PM
When using RaiseBubbleEvent(source, args) in my Parent Page OnBubbleEvent is called twice! Andreas Klemt ASP .Net 0 07-04-2003 01:03 AM
Overrides Function OnBubbleEvent As Boolean ---> What happens when Return True|False ? Andreas Klemt ASP .Net 0 07-04-2003 12:04 AM



Advertisments