Hello,
I am able to dynamically create and resize the RadEditor within a RadGrid with the code listed below. Although, if any of the previous RadEditors contain content they will not resize to the specified height of 25px, when dynamically adding a new instance of the RadEditor in the RadGrid.
UI:

Code:
<script type="text/javascript">
function OnClientLoad(editor) {
editor.get_text();
/* Increase height of Instruction Editor */
editor.attachEventHandler("onfocus", function (e) {
editor.setSize("225", "200");
});
/* Reset to default height of Instruction Editor */
editor.attachEventHandler("blur", function (e) {
editor.setSize("225", "25");
editor.set_html(editor);
});
}
</script>
<style type="text/css">
.reContentArea
{
white-space: pre-line !important;
word-wrap: break-word !important;
max-width: 200px;
text-align: left;
}
<telerik:GridTemplateColumn HeaderText="Instructions" UniqueName="Instructions" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<telerik:RadEditor ID="txtInstruction" runat="server" MaxTextLength="1000" Style="overflow:auto; overflow-x: hidden; overflow-y: scroll;" AutoResizeHeight="true" EditModes="Design" ContentAreaMode="Div" ToolbarMode="Default" OnClientLoad="OnClientLoad" Width="220px" Height="25px" ToolsWidth="130px">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
</ItemTemplate>
</telerik:GridTemplateColumn>
How do I dynamically collaps2 all previous RadEditors, that contain content, to 25px when creating a new RadEditor row within the RadGrid?
Thank You in Advance!
I am able to dynamically create and resize the RadEditor within a RadGrid with the code listed below. Although, if any of the previous RadEditors contain content they will not resize to the specified height of 25px, when dynamically adding a new instance of the RadEditor in the RadGrid.
UI:
Code:
<script type="text/javascript">
function OnClientLoad(editor) {
editor.get_text();
/* Increase height of Instruction Editor */
editor.attachEventHandler("onfocus", function (e) {
editor.setSize("225", "200");
});
/* Reset to default height of Instruction Editor */
editor.attachEventHandler("blur", function (e) {
editor.setSize("225", "25");
editor.set_html(editor);
});
}
</script>
<style type="text/css">
.reContentArea
{
white-space: pre-line !important;
word-wrap: break-word !important;
max-width: 200px;
text-align: left;
}
<telerik:GridTemplateColumn HeaderText="Instructions" UniqueName="Instructions" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
<ItemTemplate>
<telerik:RadEditor ID="txtInstruction" runat="server" MaxTextLength="1000" Style="overflow:auto; overflow-x: hidden; overflow-y: scroll;" AutoResizeHeight="true" EditModes="Design" ContentAreaMode="Div" ToolbarMode="Default" OnClientLoad="OnClientLoad" Width="220px" Height="25px" ToolsWidth="130px">
<Tools>
<telerik:EditorToolGroup>
<telerik:EditorTool Name="ForeColor" />
<telerik:EditorTool Name="Bold" />
<telerik:EditorTool Name="Italic" />
<telerik:EditorTool Name="Underline" />
</telerik:EditorToolGroup>
</Tools>
</telerik:RadEditor>
</ItemTemplate>
</telerik:GridTemplateColumn>
How do I dynamically collaps2 all previous RadEditors, that contain content, to 25px when creating a new RadEditor row within the RadGrid?
Thank You in Advance!
