Save and Restore Editor Size

Thread is closed for posting
2 posts, 0 answers
  1. 43328360-65CE-42E7-8D5C-81187E89B75A
    43328360-65CE-42E7-8D5C-81187E89B75A avatar
    26 posts
    Member since:
    Apr 2009

    Posted 09 Jul 2009 Link to this post

    Requirements

    RadControls version 2009.1.527.35

     

    .NET version

    3.5

    Visual Studio version

    2008

    programming language

    C#

    browser support

    all browsers supported by RadControls


    PROJECT DESCRIPTION

    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.

    -Jon







  2. DF60784D-55A5-4263-9F10-A12FA48C9ADC
    DF60784D-55A5-4263-9F10-A12FA48C9ADC avatar
    14477 posts
    Member since:
    Apr 2022

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

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