radeditor focus doesn't work

3 posts, 0 answers
  1. priya nallaperumal
    priya nallaperumal avatar
    23 posts
    Member since:
    Nov 2009

    Posted 16 Feb 2010 Link to this post

    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="ClientLoad"  ContentFilters="MakeUrlsAbsolute" >

    protected void sendbtn_Click(object sender, EventArgs e)

    radeditor doesn't set focus on button click.. function.
    i tried client side also. but $find("<%=RadEditor1.ClientID%>") is null.. not an object error is occur...
    anyone please help me..
  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 16 Feb 2010 Link to this post

    Hello priya,

    In order to get the desired result you should use client-side code as shown below:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RadEditorPrizes.aspx.cs"
        Inherits="Default2" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title>Untitled Page</title>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" />
            <telerik:RadEditor runat="server" ID="RadEditor1">
               Here is sample content!   
            <script type="text/javascript">   
       function setFocus(sender, args)   
          //set the focus on the the editor 
          var editor = $find("<%= RadEditor1.ClientID%>");  
            <asp:Button ID="btn" runat="server" Text="Set Focus" OnClientClick="setFocus();return false;" />

    Best wishes,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft R3 2016 release webinar banner
  4. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 16 Feb 2010 Link to this post

    I believe this help article should be of use, it tells you how to set the focus to the RadEditor on a button click.

Back to Top