This is a migrated thread and some comments may be shown as answers.

handling events for radPanelBar

1 Answer 58 Views
Panelbar (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Top achievements
Rank 1
Barkha asked on 23 Oct 2007, 09:04 PM

I want to do some action on click of the RadPanelBarGroupElement just as we do some action on click of its contituents controls ( RadButtonElement / hosted controls ).

From the documentation , I learned that RadPanelBarGroupElements have only 2 events.
1) RadPanelBarGroupElement.GroupExpandedChanged
2) RadPanelBarGroupElement.GroupSelectedChanged 

None of these events are helping me because they are fired also when the form is loaded and when the group is deselected.

I just want to load one form ( add a usercontrol ) on click of RadpanelBarGroupElement.

I tried to add an event on Action --> click , but the event doesnt get fired on clicking the RadpanelBarGroupElement.

Can someone please tell me how can i have same behavior of  (click on RadButtonElements ) on RadpanelBarGroupElement as well without the events getting fired multiple times.


1 Answer, 1 is accepted

Sort by
Telerik team
answered on 24 Oct 2007, 02:30 PM
Hello Barkha,

You could try subscribing for the MouseDown event of the FillPrimitive in a group's caption in the following way:

protected override void OnLoad(EventArgs e) 
    ClassSelector captionFillSelector = new ClassSelector("GroupCaptionFill"); 
    FillPrimitive captionFill = captionFillSelector.GetSelectedElements( 
        this.radPanelBarGroupElement1)[0] as FillPrimitive; 
    captionFill.MouseDown += new MouseEventHandler(captionButton_MouseDown);  
void captionButton_MouseDown(object sender, MouseEventArgs e) 
    MessageBox.Show("Mouse Down"); 

If you do not want to be notified when the user clicks on a group's caption but on the group content panel, you could try handling the MouseDown event of that group. However this approach might or might not work depending of the content of the group.

Contact us again, if you need any further assistance.

All the best,
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Panelbar (obsolete as of Q2 2010)
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question