RadRichTextBox.Focus() on startup

2 posts, 0 answers
  1. Jasper
    Jasper avatar
    1 posts
    Member since:
    Apr 2014

    Posted 15 Apr 2014 Link to this post


    I need to get the RadRichTextBox to focus (without using any mouse click) when the editor has been fully loaded.
    I'm trying this with the following code:

    public MainPage() {

    This is not working. Can't figure out why..
    As soon as i click anywhere in the editor, it will focus, but I want it to focus automaticly without clicking manually.

    Is this possible?

    Kind regards
    PS: I'm using the latest trial version.
  2. Petya
    Petya avatar
    983 posts

    Posted 17 Apr 2014 Link to this post

    Hi Jasper,

    Could you please share what is the behavior when testing with different browsers?

    It seems this might be related to a common issue of Google Chrome/Safari and Flash/Silverlight plug-ins. In a gist, the problem is that the browser does not pass the focus to the plugin when loading, so there is no way to pass it to the RadRichTextBox either. We haven't been able to come up with a good solution for this issue so far but you can try searching around on the web. What we have used in the past was the following hack:
    this.Loaded += (s, a) =>
    put in the user control containing the RadRichTextBox, but this seems to not work consistently (and especially for Chrome).

    I hope the provided information is helpful.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top