How to find all editors inside a panel on client side and attach an event handler for user interaction?

2 posts, 0 answers
  1. Tigger Tag
    Tigger Tag avatar
    23 posts
    Member since:
    Dec 2009

    Posted 08 Apr Link to this post



    I have two questions.

    1. I need to have a client side event handler be called whenever user interacts with any of the RadEditors that exist on the page. What event I need to use?

    2. Also, I can't change the markup or the code behind to add this event handler. So, how will I find all RadEditors on the page and attach this event using javascript?


    Any help is greatly appreciated.




  2. Danail Vasilev
    Danail Vasilev avatar
    1476 posts

    Posted 13 Apr Link to this post

    Hi Ana,

    You can use the code below to get all the editors on the page.  You can also attach client-side handlers with JavaScript -

    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadEditor ID="RadEditor1" runat="server"></telerik:RadEditor>
        <telerik:RadEditor ID="RadEditor2" runat="server"></telerik:RadEditor>
        <telerik:RadButton ID="RadButton1" runat="server" />
            function pageLoad() {
                var radControls = $telerik.radControls;
                var editors = new Array();
                alert('number of ui controls: ' + radControls.length);
                for (var i = 0; i < radControls.length; i++) {
                    var currControl = radControls[i];
                    if (currControl && (currControl instanceof Telerik.Web.UI.RadEditor)) {
                alert('number of editors: ' + editors.length);

    Danail Vasilev
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top