This question is locked. New answers and comments are not allowed.
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
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
0
Hi Patrick,
Miro Miroslavov
the Telerik team
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.
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
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
Hi Patrick,
You can cast the RoutedEventArgs to RadRoutedEventAgrs like so:
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
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
it works!
But you should consider changing the arguments of the DropDownOpening event to RadRoutedEventArgs for the next release of the RadControls.
Patrick