Save and Restore Editor Size

2 posts, 0 answers
  1. Jon
    Jon avatar
    26 posts
    Member since:
    Apr 2009

    Posted 09 Jul 2009 Link to this post


    RadControls version 2009.1.527.35


    .NET version


    Visual Studio version


    programming language


    browser support

    all browsers supported by RadControls


    I have code working to save and restore the size of the RadEditor. The solution uses a hidden textbox on the page, along with script, called by OnClientSubmit(),  to populate that textbox with "widthpx heightpx", and code-behind that is called on postback to read that textbox contents and save the editor's height and width to profile. There is also code called by Page_Load to restore that height and width from profile.

    So, the steps to create this are:

    1. Put a RadEditor and a Textbox on the page
    2. Provide an OnClientSubmit handler in javascript to read the current editor height and width and store those in the (hidden) textbox
    3. Provide a "Save" button with OnClientSubmit to call that handler
    4. Provide code-behind to read the textbox values and save the editor sizes in profile
    5. Provide code-behind to load editor sizes from profile and set the editor

    The profile in this example is stored in an MDB for this code project, but in production SQL server is used.

    That's it.


  2. Rumen
    Rumen avatar
    14386 posts

    Posted 10 Jul 2009 Link to this post

    Hi Jon,

    Thank you for your contribution - I am sure that your fellow developers will find this solution very helpful.

    We do appreciate your work and I added 3000 Telerik points to your account.

    Best regards,
    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.
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.