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

RadEditor in asp:Repeater causing JS error

3 Answers 42 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 05 Jun 2017, 02:39 PM

hi, i am using a radeditor in my asp:Repeater. when user tried to add a new row in the repeater, a JS error was thrown

 

screen shot of error

refer to JSError.png

 

code

01.<asp:UpdateProgress ID="updateProgress6" runat="server" AssociatedUpdatePanelID="pnlModular2">
02.     <ProgressTemplate>
03.         <div style="; text-align: center; height: 100%; width: 100%; top: 0; right: 0; left: 0; z-index: 9999999; background-color: #000000; opacity: 0.7;">
04.              <span style="border-width: 0px; ; padding: 50px; background-color: #FFFFFF; font-size: 36px; left: 40%; top: 40%;">Loading ...</span>
05.         </div>
06.     </ProgressTemplate>
07.</asp:UpdateProgress>
08.<asp:UpdatePanel ID="pnlModular2" runat="server" UpdateMode="Conditional">
09.      <ContentTemplate>
10.            <asp:Repeater ID="rptStructureModular2" runat="server" OnItemCommand="rptStructureModular2_ItemCommand" OnItemDataBound="rptStructureModular2_ItemDataBound">
11.                 <HeaderTemplate>
12.                       <table cellpadding="0px" cellspacing="0px" style="width: 95%;">
13.                 </HeaderTemplate>
14.                 <ItemTemplate>
15.                     <tr>
16.                        <td style="padding: 1em 1em;">
17.                              <table style="width: 106%;" cellpadding="0px" cellspacing="0px" class="repeaterTable">
18.                                  <tr>
19.                                    <td colspan="2" style="padding: 1em 1em;">
20.                                                    <asp:Label runat="server" ID="lblModular">Module <%# Container.ItemIndex+1 %></asp:Label>
21.                                                    <asp:LinkButton ID="btnRemoveModular2" runat="server"
22.                                                    CommandName="remove" CommandArgument='<%# Container.ItemIndex %>'>
23.                                                        <span aria-hidden="true" class="glyphicon glyphicon-trash"></span>
24.                                                    </asp:LinkButton>
25.                                                </td>
26.                                            </tr>
27.                                            <tr style="overflow: hidden;" class="<%# Container.ItemIndex+1 %>">
28.                                                <td style="padding: 1em 1em; width: 20%">Title</td>
29.                                                <td style="padding: 1em 1em;">
30.                                                    <asp:TextBox ID="txtTitle" onchange="disableNext()" CssClass="adminText" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "title") %>'></asp:TextBox>
31.                                                </td>
32.                                            </tr>
33.                                            <tr style="overflow: hidden;" class="<%# Container.ItemIndex+1 %>">
34.                                                <td style="padding: 1em 1em;">Description</td>
35.                                                <td style="padding: 1em 1em;">
36.                                                    <telerik:RadEditor ID="txtDescription" runat="server" Content='<%# DataBinder.Eval(Container.DataItem, "description") %>' DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd" OnClientLoad="OnClientLoad">
37.                                                    </telerik:RadEditor>
38.                                                </td>
39.                                            </tr>
40.                                            </table>
41.                                            </td>
42.                                        </tr>
43.                                    </ItemTemplate>
44.                                    <FooterTemplate>
45.                                    <tr>
46.                                    <td style="padding: 1em 1em;" align="right">
47.                                    <asp:Button ID="btnAddModular2" runat="server" Text="Add Module" OnClick="btnAddModular2_Click" />
48.                             </td>
49.                           </tr>
50.                        </table>
51.                   </FooterTemplate>
52.              </asp:Repeater>
53.      </ContentTemplate>
54.</asp:UpdatePanel>

3 Answers, 1 is accepted

Sort by
0
Benjamin
Top achievements
Rank 1
answered on 06 Jun 2017, 02:42 AM

Hi. i would like to further add that,

this error only occur on the user end, if i access the same page directly from the server the JS error won't occur.

Further i deploy this same piece on a different server. the JS error did not happen when i tried to access the page on server side or client.

 

 

i

f there is issue with the code behind won't the error occur no matter where i access the page?

but for my case, this error only occur on the user end, if i access the same page directly from the server the JS error won't occur.

 

Further i deploy this same piece on a different server. the JS error did not happen when i tried to access the page on server side or client.

if there is issue with the code behind won't the error occur no matter where i access the page?

but for my case, this error only occur on the user end, if i access the same page directly from the server the JS error won't occur.

 

Further i deploy this same piece on a different server. the JS error did not happen when i tried to access the page on server side or client.

0
Benjamin
Top achievements
Rank 1
answered on 08 Jun 2017, 03:37 AM

i have isolated the error to be happening somewhere when the repeater is rendering the new set of control.

if i replace RadEditor with asp:Textbox. this error will not happen.

0
Benjamin
Top achievements
Rank 1
answered on 08 Jun 2017, 03:51 AM
removing the background colour and font colour tools seems to fix the issue. but i need this 2 tool.. need help on this how to fix this error?
Tags
Editor
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Benjamin
Top achievements
Rank 1
Share this question
or