What event is fired on resize?

3 posts, 0 answers
  1. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 19 Jul 2010 Link to this post

    I would like to prevent the RadEditor from being expanded horizontally (though vertical is okay).  I thought the best way to do this is intercept some OnResize() event and then force the width to a predefined size.  But I can't find which event is fired when the control is resized.  Can anyone help, or suggest another way to achieve the same functionality?  Thanks.
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 22 Jul 2010 Link to this post

    Hi Matthew,

    RadEditor does not offer OnResize client-side event. However, it has OnResizeStart() and OnResizeEnd() which control this functionality.You can extend those methods to match the requested feature, e.g.

    Copy Code
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad">
    </telerik:RadEditor>
      
    <script type="text/javascript">
        function OnClientLoad(editor, args) {
            var oldOnResizeEnd = editor.onResizeEnd;//store the old function
            editor.onResizeEnd = function() {
                eval(oldOnResizeEnd);//execute the old function
                alert(editor.get_element().offsetWidth); 
            };
        }
    </script>

    I hope this information helps.

    Sincerely yours,
    Dobromir
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 22 Jul 2010 Link to this post

    This worked great, thank you!
Back to Top