This is a migrated thread and some comments may be shown as answers.

[Solved] Unwanted space around radeditor

2 Answers 210 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 20 Jun 2008, 11:44 AM
RadEditor example

I have a problem with unwanted extra space appearing at the bottom of RadEditor.
The Editor is within an edit template within a RadGrid.
It initially loads without the extra space, then flickers and expands to add the space at the bottom.
A screenshot is shown on the image link above if you can see it.
The aspx is shown below.
I would be grateful for any advice about to stop this behaviour.

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

GridLines="None" Width="869px" Skin="Hay">

<MasterTableView DataKeyNames="addressID">

<NoRecordsTemplate>

No Records found

</NoRecordsTemplate>

<RowIndicatorColumn Visible="False">

<HeaderStyle Width="20px"></HeaderStyle>

</RowIndicatorColumn>

<ExpandCollapseColumn Visible="False" Resizable="False">

<HeaderStyle Width="20px"></HeaderStyle>

</ExpandCollapseColumn>

<Columns>

<telerik:GridBoundColumn DataField="addressid" HeaderText="addressid" UniqueName="addressid"

ReadOnly="True" Visible="False">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="shortcut" HeaderText="Shortcut"

UniqueName="shortcut" ReadOnly="True">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="shortaddress" HeaderText="Address"

ReadOnly="True" UniqueName="shortaddress">

</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="address" HeaderText="address"

UniqueName="address" ReadOnly="True" Visible="False">

</telerik:GridBoundColumn>

<telerik:GridTemplateColumn UniqueName="TemplateColumn" >

<EditItemTemplate>

<asp:LinkButton runat="server" CommandName="Update" Text="Update"></asp:LinkButton>

&nbsp;<asp:LinkButton runat="server" CausesValidation="false" CommandName="Cancel"

Text="Cancel"></asp:LinkButton>

<br />

Shortcut:

<asp:TextBox ID="txtShortcut" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "shortcut") %>'></asp:TextBox>

<br />

<telerik:RadEditor ID="Editor" runat="server" Height="200" Width="806px"

ToolsWidth="570px" HasPermission="true"

Editable="true" ImagesPaths="~/Img" ShowHtmlMode="false"

ShowSubmitCancelButtons="false" SaveInFile="false" Html='<%# DataBinder.Eval(Container.DataItem, "address") %>'

Skin="Outlook" EditModes="Design, Html" AutoResizeHeight="True">

<Tools>

<telerik:EditorToolGroup Tag="Formatting">

<telerik:EditorTool Name="Bold" />

<telerik:EditorTool Name="Italic" />

<telerik:EditorTool Name="Underline" />

<telerik:EditorTool Name="StrikeThrough" />

<telerik:EditorTool Name="Subscript" />

<telerik:EditorTool Name="Superscript" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup Tag="Cutpaste">

<telerik:EditorTool Name="Cut" />

<telerik:EditorTool Name="Paste" />

<telerik:EditorTool Name="PastePlainText" />

<telerik:EditorTool Name="Undo" />

<telerik:EditorTool Name="Redo" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup Tag="Justify">

<telerik:EditorTool Name="JustifyLeft" />

<telerik:EditorTool Name="JustifyCenter" />

<telerik:EditorTool Name="JustifyRight" />

<telerik:EditorTool Name="JustifyFull" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup Tag="Indenting">

<telerik:EditorTool Name="Indent" />

<telerik:EditorTool Name="Outdent" />

<telerik:EditorTool Name="InsertUnorderedList" />

<telerik:EditorTool Name="InsertOrderedList" />

</telerik:EditorToolGroup>

<telerik:EditorToolGroup Tag="Tools">

<telerik:EditorTool Name="InsertTable" />

<telerik:EditorTool Name="InsertSymbol" />

<telerik:EditorTool Name="AjaxSpellCheck" />

<telerik:EditorTool Name="InsertSnippet" />

<telerik:EditorTool Name="ToggleScreenMode" />

<telerik:EditorTool Name="Help" />

</telerik:EditorToolGroup>

</Tools>

<Content>

</

Content>

</telerik:RadEditor>

</EditItemTemplate>

<ItemTemplate>

<asp:LinkButton runat="server" CausesValidation="false" CommandName="Edit" Text="Edit"></asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

<EditFormSettings>

<PopUpSettings ScrollBars="None"></PopUpSettings>

</EditFormSettings>

<PagerTemplate>

shortcut

</PagerTemplate>

<CommandItemTemplate>

shortaddress

</CommandItemTemplate>

</MasterTableView>

</telerik:RadGrid>

2 Answers, 1 is accepted

Sort by
0
Accepted
Brian
Top achievements
Rank 1
answered on 21 Jun 2008, 04:41 PM
radeditor1.modules.clear works for me in IE usually.  If it's in the grid you'd have to do it on itemDataBound and check to see if the type is editMode... something like this

Protected Sub RadGrid1_ItemDataBound(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound 
        If e.Item.ItemType = Telerik.Web.UI.GridItemType.EditFormItem AndAlso e.Item.IsInEditMode Then 
            Dim radEdit As Telerik.Web.UI.RadEditor = e.Item.FindControl("RadEditor1"
            radEdit.modules.clear 
        End If 
End Sub 

0
Peter
Top achievements
Rank 1
answered on 23 Jun 2008, 12:03 PM
Thank you Brian.
That seemed to do the trick!
Tags
Editor
Asked by
Peter
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
Peter
Top achievements
Rank 1
Share this question
or