This question is locked. New answers and comments are not allowed.
Hi. I am learning about the events that have the radPanelBar control.
I need an event that give the selected GroupElement programatly.
I will try by using the "Caption_Changed· Event and the "Region Event" but i can't know the index or selected group.
Thanks
I need an event that give the selected GroupElement programatly.
I will try by using the "Caption_Changed· Event and the "Region Event" but i can't know the index or selected group.
Thanks
7 Answers, 1 is accepted
0
Hi Arturo Duarte,
When a group is expanded a GroupExpandedChanged event is fired. You could expand/collapse a group manually calling the PerformExpand method of the group. When you handle that event you could find which is the current expanded group checking its Expanded property. If Expanded is true then the group is expanded.
If you need further assistance we will be happy to help you.
Sincerely yours,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
When a group is expanded a GroupExpandedChanged event is fired. You could expand/collapse a group manually calling the PerformExpand method of the group. When you handle that event you could find which is the current expanded group checking its Expanded property. If Expanded is true then the group is expanded.
If you need further assistance we will be happy to help you.
Sincerely yours,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Marturo77
Top achievements
Rank 1
answered on 09 May 2007, 03:39 PM
I can't view the GroupExpandedChanged in the radPanelBar control in the visual studio designer. I have the Telerik 2007 Q1 winforms controls.
With this event i can capture the index of the selected item?
Thanks
With this event i can capture the index of the selected item?
Thanks
0
Hi Arturo Duarte,
The GroupExpandedChanged event is an event of RadPanelBarGroupElement, not the RadPanelBar.
Indeed you are able to get the current expanded group in that event because the sender argument is the group which fires the event. So you are able to cast the sender to RadPanelBarGroupElement and then get its index from RadPanelBarElement's Items collection . To do so you can subscribe all of your groups GroupExpandedChanged event to a single event handler using code like:
Then you could handle that event and retrieve the index of the group doing the following:
Regards,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The GroupExpandedChanged event is an event of RadPanelBarGroupElement, not the RadPanelBar.
Indeed you are able to get the current expanded group in that event because the sender argument is the group which fires the event. So you are able to cast the sender to RadPanelBarGroupElement and then get its index from RadPanelBarElement's Items collection . To do so you can subscribe all of your groups GroupExpandedChanged event to a single event handler using code like:
foreach (RadPanelBarGroupElement group in this.radPanelBar1.PanelBarElement.Items) |
{ |
group.GroupExpandedChanged += new EventHandler(group_GroupExpandedChanged); |
} |
Then you could handle that event and retrieve the index of the group doing the following:
void group_GroupExpandedChanged(object sender, EventArgs e) |
{ |
if ((sender as RadPanelBarGroupElement) != null) |
{ |
RadPanelBarGroupElement group = sender as RadPanelBarGroupElement; |
int index = this.radPanelBar1.PanelBarElement.Items.IndexOf(group); |
} |
} |
Regards,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Elie
Top achievements
Rank 1
answered on 07 Jun 2007, 05:52 PM
I have attempted to use the GroupExpandedChanged event, and the SelectedGroupChanged event and the event is being fired twice per group. How can I solve the problem. I want to have an event fires once when a group is selected.
thx
thx
0
Hello Elie,
It seems that you have hit a problem with our controls related to the GroupExpandedChanged event. We confirm that it is firing twice and we are going to fix it for the next release of RadControls for WinForms.
We are sorry for the inconvenience. Your points have been updated.
All the best,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
It seems that you have hit a problem with our controls related to the GroupExpandedChanged event. We confirm that it is firing twice and we are going to fix it for the next release of RadControls for WinForms.
We are sorry for the inconvenience. Your points have been updated.
All the best,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Najoua
Top achievements
Rank 1
answered on 12 Jun 2007, 10:04 AM
Hello,
I don't really understand.I wanna use RadPanelBar for winforms in order to build an outlook-style windows form, so I have to define each event associated to each groupelement of the panelbar.
I want to show a form for each GroupExpandedChanged event.
Is it possible with your control?
I don't really understand.I wanna use RadPanelBar for winforms in order to build an outlook-style windows form, so I have to define each event associated to each groupelement of the panelbar.
I want to show a form for each GroupExpandedChanged event.
Is it possible with your control?
0
Hi Mlle,
We currently have problems with the events in RadPanelBar which we will fix for the next major release of RadControls for WinForms.
At present I can suggest an alternative solution: handle the mouse down event of each group's caption. To do that you will have to follow these steps:
1) Subscribe to caption's mouse down event:
foreach (RadPanelBarGroupElement group in this.radPanelBar1.Items)
{
group.Children[2].Children[0].MouseDown += new MouseEventHandler(Form1_MouseDown);
}
2) Get the group which was clicked on:
void Form1_MouseDown(object sender, MouseEventArgs e)
{
RadPanelBarGroupElement group = (sender as FillPrimitive).Parent.Parent as RadPanelBarGroupElement;
}
If you need further assistance, please write back.
Regards,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
We currently have problems with the events in RadPanelBar which we will fix for the next major release of RadControls for WinForms.
At present I can suggest an alternative solution: handle the mouse down event of each group's caption. To do that you will have to follow these steps:
1) Subscribe to caption's mouse down event:
foreach (RadPanelBarGroupElement group in this.radPanelBar1.Items)
{
group.Children[2].Children[0].MouseDown += new MouseEventHandler(Form1_MouseDown);
}
2) Get the group which was clicked on:
void Form1_MouseDown(object sender, MouseEventArgs e)
{
RadPanelBarGroupElement group = (sender as FillPrimitive).Parent.Parent as RadPanelBarGroupElement;
}
If you need further assistance, please write back.
Regards,
Ray
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center