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

[Solved] Focus on RadEditor (ajax q1 2009)

1 Answer 74 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Kashif Imran
Top achievements
Rank 1
Kashif Imran asked on 13 May 2009, 06:42 PM
I have RadEditor (ajax) and submit button along with other asp.net controls. In c# if I do btnSubmit.Focus() it works. But it does not work for editor. How can I make it work for editor?

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 18 May 2009, 07:03 AM
Hi Kashif,

You can set the focus to RadEditor's content area on button click using the following C# code:

void btnShow_Click(object sender, EventArgs e)
{
    string script = "window.setTimeout(function(){$find('" + RadEditor1.ClientID + "').setFocus();}, 0);";
    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "focus", script, true);


where RadEditor1 is the ID of RadEditor.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Kashif Imran
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or