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

RadDropDownButton, DropDownOpening event

4 Answers 126 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 27 Mar 2012, 03:05 PM
Hello,
Is there a method to cancel the opening of the drop down in a RadDropDownButton?
If not, can you please add it as a request for this control?
Patrick

4 Answers, 1 is accepted

Sort by
0
Miro Miroslavov
Telerik team
answered on 28 Mar 2012, 08:33 AM
Hi Patrick,

 You can handle the DropDownOpeningEvent and if you want to stop the opening, just set e.Handled = true. That will prevent the DropDownButton from opening. 
Hope this helps.

Greetings,
Miro Miroslavov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 28 Mar 2012, 08:51 AM
Miro,
the parameter of the DropDownOpening event is an RoutedEventArgs and the RoutedEventArgs class doesn't have have an Handled property.
That's why I'm asking.
Patrick
0
Accepted
Tina Stancheva
Telerik team
answered on 30 Mar 2012, 02:31 PM
Hi Patrick,

You can cast the RoutedEventArgs to RadRoutedEventAgrs like so:
private void RadDropDownButton_DropDownOpening(object sender, RoutedEventArgs e)
{
    (e as RadRoutedEventArgs).Handled = true;
}

This will handle the event. Please give it a try and let us know if it helps.

All the best,
Tina Stancheva
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 30 Mar 2012, 03:01 PM
Tina,
it works!
But you should consider changing the arguments of the DropDownOpening event to RadRoutedEventArgs for the next release of the RadControls.
Patrick
Tags
Buttons
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Miro Miroslavov
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Tina Stancheva
Telerik team
Share this question
or