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

[Solved] RadEditor in modal popup

1 Answer 193 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Micke83
Top achievements
Rank 1
Micke83 asked on 26 Oct 2009, 11:00 AM
Hello,

I'm trying to use a RadEditor inside a Popup that is coming from a RadGrid. This is a part of my code:

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
    <script type="text/javascript"
       var popUp; 
       function PopUpShowing(sender, eventArgs) 
       { 
            popUp = eventArgs.get_popUp(); 
            popUp.style.top = "50px"
       } 
    </script> 
    </telerik:RadCodeBlock> 
    <telerik:RadGrid ID="RadGrid1" AllowAutomaticUpdates="true" runat="server" AllowAutomaticInserts="True" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="dsNyheter" GridLines="None" Skin="Vista" MasterTableView-AllowFilteringByColumn="true" MasterTableView-AllowMultiColumnSorting="true" MasterTableView-AllowNaturalSort="true" MasterTableView-EditMode="PopUp" MasterTableView-HierarchyLoadMode="ServerOnDemand" PagerStyle-FirstPageToolTip="Första sidan" PagerStyle-LastPageToolTip="Sista sidan" PagerStyle-Mode="Slider" PagerStyle-NextPagesToolTip="Nästa sidorna" PagerStyle-NextPageToolTip="Nästa sida" PagerStyle-PageSizeLabelText="Rader per sida:" PagerStyle-PrevPagesToolTip="FöregÃ¥ende sidor" PagerStyle-PrevPageToolTip="FöregÃ¥ende sida" PagerStyle-PagerTextFormat="Ändra sida: {4} &nbsp;Sida <strong>{0}</strong> av <strong>{1}</strong>, rad <strong>{2}</strong> till <strong>{3}</strong> av <strong>{5}</strong>." StatusBarSettings-ReadyText="Redo" StatusBarSettings-LoadingText="Laddar..." SortingSettings-SortToolTip="Klicka här för att sortera" SortingSettings-SortedDescToolTip="Sorterad fallande" SortingSettings-SortedAscToolTip="Sorterad stigande" MasterTableView-NoMasterRecordsText="Data saknas." MasterTableView-NoDetailRecordsText="Inga underrader finns." GroupingSettings-GroupSplitDisplayFormat="Visar {0} av {1} rader." GroupingSettings-GroupContinuesFormatString="Gruppen fortsätter pÃ¥ nästa sida." GroupingSettings-GroupContinuedFormatString="... grupp fortsätter frÃ¥n föregÃ¥ende sida. " GroupingSettings-CollapseTooltip="SlÃ¥ ihop grupp" GroupingSettings-ExpandTooltip="Expandera grupp" GroupingSettings-UnGroupButtonTooltip="Klicka här för att avgruppera"
        <ClientSettings> 
            <ClientEvents OnPopUpShowing="PopUpShowing" /> 
            <Selecting AllowRowSelect="true" /> 
        </ClientSettings> 
        <MasterTableView DataKeyNames="news_id" DataSourceID="dsNyheter" AllowFilteringByColumn="True" AllowMultiColumnSorting="True" EditMode="PopUp" CommandItemDisplay="TopAndBottom"
            <CommandItemTemplate> 
                <asp:LinkButton ID="LinkButton2" runat="server" CommandName="InitInsert"><img style="border:0px;vertical-align:middle; margin-top: 5px; margin-bottom: 8px; margin-left: 10px; margin-right: 8px;" alt="" src="Images/AddRecord.gif" />Lägg till nyhet</asp:LinkButton>&nbsp;&nbsp; 
            </CommandItemTemplate> 
            <Columns> 
                <telerik:GridBoundColumn DataField="news_id" HeaderText="ID" ReadOnly="true" Display="false" UniqueName="news_id"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="news_headln" HeaderText="Rubrik" UniqueName="news_headln"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="news_startdate" DataFormatString="{0:yyyy-MM-dd hh:mm}" HeaderText="Startdatum" UniqueName="news_startdate"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="news_enddate" HeaderText="Slutdatum" UniqueName="news_enddate"
                </telerik:GridBoundColumn> 
                <telerik:GridEditCommandColumn CancelText="Avbryt" EditText="Ändra"
                </telerik:GridEditCommandColumn> 
            </Columns> 
            <EditFormSettings EditFormType="Template" CaptionDataField="news_headln" CaptionFormatString="Ändra nyhet: {0}"
            <PopUpSettings  Width="648px" Height="600px" Modal="true" /> 
                <EditColumn UniqueName="EditCommandColumn1">                    
                </EditColumn> 
                <FormTemplate> 
                    <table border="0" cellpadding="4" cellspacing="0"
                        <tr> 
                            <td style="padding-left: 8px;"
                                Rubrik 
                            </td> 
                            <td> 
                                Startdatum 
                            </td> 
                            <td> 
                                Slutdatum 
                            </td> 
                        </tr> 
                        <tr> 
                            <td style="padding-left: 8px;"
                                <asp:TextBox ID="news_headln" Text='<%# Bind("news_headln") %>' Width="300" runat="server"></asp:TextBox> 
                            </td> 
                            <td> 
                                <asp:TextBox ID="news_startdate" Text='<%# Bind("news_startdate") %>' Width="100" runat="server"></asp:TextBox> 
                            </td> 
                            <td> 
                                <asp:TextBox ID="news_enddate" Text='<%# Bind("news_enddate") %>' Width="100" runat="server"></asp:TextBox> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="3" style="padding-left: 8px;"
                                InnehÃ¥ll 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="3" style="padding-left: 8px;"
                                <telerik:RadEditor ID="RadEditor1" TableLayoutCssFile="~/Empty.css" Content='<%# Bind("news_content") %>' style="z-index: 90000;" Width="622" runat="server" Skin="Office2007" ToolsFile="ToolsFile.xml" SpellCheckSettings-DictionaryLanguage="sv-SE" ImageManager-ViewPaths="~/UserFiles/Image" ImageManager-UploadPaths="~/UserFiles/Image" ImageManager-SearchPatterns="*.gif,*.jpg,*.jpeg,*.png,*.bmp" DocumentManager-ViewPaths="~/UserFiles/File" DocumentManager-UploadPaths="~/UserFiles/File" ImageManager-DeletePaths="~/UserFiles/Image"
                                    <Languages> 
                                        <telerik:SpellCheckerLanguage Code="sv-SE" Title="Swedish" /> 
                                    </Languages> 
                                    <CssFiles> 
                                        <telerik:EditorCssFile Value="~/Admin/EditorContentArea.css" /> 
                                    </CssFiles> 
                                </telerik:RadEditor> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="3" style="padding-left: 8px;"
                                <asp:Button ID="btnUpdate" CommandName="Update" runat="server" Text="Spara" /> 
                                <asp:Button ID="btnUpdateCancel" CommandName="Cancel" runat="server" Text="Avbryt" /> 
                            </td> 
                        </tr> 
                    </table> 
                </FormTemplate> 
            </EditFormSettings> 
        </MasterTableView> 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True"
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
    </telerik:RadGrid> 

The problem is that in Firefox, after reloading the page the RadEditor becomes disabled and loses it's text. This only happens in Firefox, in IE it works great.

Anyone know why this is happening?

Thanks,
Michael


1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 29 Oct 2009, 01:14 PM
Hi Micke83,

Could you please register the external skin of RadEditor and try to reproduce the problem in Firefox again?
Please, also see the following KB article: RadEditor Content Not Saved After Ajax Update in Firefox.

If this does not solve the problem, please open a support ticket and send a fully working project that demonstrates it. We will do our best to provide a solution after reproducing the problem.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Micke83
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or