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

RadButtonElement set selected

1 Answer 39 Views
CommandBar
This is a migrated thread and some comments may be shown as answers.
Arturo
Top achievements
Rank 1
Arturo asked on 03 Jun 2011, 11:23 PM
Hi.

I'm now in telerik and i want to know how I can set  RadButtonElement selected so when the user press enter the RadButtonElement
 will execute its event. I don't want to create a key_down event.

Thanks

Arturo

1 Answer, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 09 Jun 2011, 08:31 AM
Hello Arturo,

Thank you for writing.

One way to achieve this is to set the button you want as a AcceptButton of the form it is in. This way whenever the user presses enter, the button will behave as if it was pressed.

If you want to select a button through code you just need to call its Select method:

this.radButton1.Select();

I hope this will help. If you have further questions, feel free to ask.

 

Kind regards,
Ivan Petrov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Tags
CommandBar
Asked by
Arturo
Top achievements
Rank 1
Answers by
Ivan Petrov
Telerik team
Share this question
or