RadButtonElement set selected

2 posts, 0 answers
  1. Arturo
    Arturo avatar
    2 posts
    Member since:
    Apr 2011

    Posted 03 Jun 2011 Link to this post

    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
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 09 Jun 2011 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top