I've got a radEditor in a popup form template of a radGrid as follows:
Because of initial size problems I've included the external style sheet files as recommended in another forum post like this:
I've also got an OnClientLoad handler to set the size of the radEditor like this:
This all works beautifully, until you change the radEditor mode. Then the size of the radEditor changes. How it changes seems to depend on which order you change modes in, but it never does return to the size I originally set it to.
Here are two examples. I've attached screen captures showing the problem using Iconico's Screen Calipers to measure the size of the radEditor.
Example 1:
Initial size in Design mode - 300px (A1 Design.png)
Change to Preview mode - 294px (A2 Preview.png)
Change to HTML mode - 294px (A3 HTML.png)
Change to Design mode - 294px (A4 Design.png)
Change t HTML mode - 330px (A5 HTML.png)
Example 2:
Initial size in Design mode - 300px (B1 Design.png)
Change to HTML mode - 330px (B2 HTML.png)
Change to Preview mode - 324px (B3 Preview.png)
Change to HTML mode - 318px (B4 HTML.png)
Change to Design mode - 324px (B5 Design.png)
I tried adding an OnClientModeChange event handler to the radGrid to reset the size again (code identical to OnClientLoad handler) but that had no effect.
<EditFormSettings EditFormType="Template" CaptionFormatString="Edit News Item" > <PopUpSettings Height="500" Width="900" Modal="true" CloseButtonToolTip="Close" ScrollBars="Auto"/> <EditColumn></EditColumn> <FormTemplate> <table width="100%" border="0" cellpadding="0" cellspacing="6"> <tr> <td valign="top"><b>Title:</b></td> <td valign="top"> <telerik:RadTextBox ID="rtbTItle" runat="server" Width="400" TextMode="SingleLine" Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' Skin="WebBlue"> </telerik:RadTextBox> </td> </tr> <tr> <td colspan="2" valign="top" style=""> <b>Item Text:</b><br /> <telerik:RadEditor ID="reItemText" runat="server" OnClientLoad="reItemText_OnClientLoad" OnClientModeChange="reItemText_OnClientModeChange" Width="800" Height="300" AutoResizeHeight="false" EnableResize="false" ToolsWidth="800" ContentAreaMode="Div" Skin="WebBlue" Content='<%# DataBinder.Eval(Container, "DataItem.ItemText") %>'> </telerik:RadEditor> </td> </tr> </table> </FormTemplate></EditFormSettings>Because of initial size problems I've included the external style sheet files as recommended in another forum post like this:
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server"> <StyleSheets> <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Editor.css" /> <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Editor.WebBlue.css" /> <telerik:StyleSheetReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Skins.Window.css" /> <telerik:StyleSheetReference Assembly="Telerik.Web.UI.Skins" Name="Telerik.Web.UI.Skins.WebBlue.Window.WebBlue.css" /> </StyleSheets></telerik:RadStyleSheetManager>I've also got an OnClientLoad handler to set the size of the radEditor like this:
function reItemText_OnClientLoad(sender,args){ sender.setSize( 800, 300 ); var oElem = sender.get_element( ); oElem.style.height = "300px"; oElem.style.width = "800px";}This all works beautifully, until you change the radEditor mode. Then the size of the radEditor changes. How it changes seems to depend on which order you change modes in, but it never does return to the size I originally set it to.
Here are two examples. I've attached screen captures showing the problem using Iconico's Screen Calipers to measure the size of the radEditor.
Example 1:
Initial size in Design mode - 300px (A1 Design.png)
Change to Preview mode - 294px (A2 Preview.png)
Change to HTML mode - 294px (A3 HTML.png)
Change to Design mode - 294px (A4 Design.png)
Change t HTML mode - 330px (A5 HTML.png)
Example 2:
Initial size in Design mode - 300px (B1 Design.png)
Change to HTML mode - 330px (B2 HTML.png)
Change to Preview mode - 324px (B3 Preview.png)
Change to HTML mode - 318px (B4 HTML.png)
Change to Design mode - 324px (B5 Design.png)
I tried adding an OnClientModeChange event handler to the radGrid to reset the size again (code identical to OnClientLoad handler) but that had no effect.
