I have tried to use an HTMLEditorExtender inside both EditItemTemplate and InsertItemTemplate in DetailsView. The Textbox does not render properly (wrong colors) and the buttons also do not render properly.
If I copy the Textbox and HTMLEditorExtender markup and paste them outside the DetailsView it all works fine.
The code is pretty simple:
<asp:TemplateField HeaderText="Problem" SortExpression="problem" HeaderStyle-Font-Bold="true" HeaderStyle-Wrap="false" >
<EditItemTemplate>
<asp:TextBox ID="ProblemText" runat="server" Text='<%# Bind("problem") %>' TextMode="MultiLine" Columns="100" Rows="14" CssClass="basic" />
<asp:HtmlEditorExtender runat="server" ID="ProblemTextHtml" DisplaySourceTab="true" TargetControlID="ProblemText" />
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="ProblemText" runat="server" Text='<%# Bind("problem") %>' TextMode="MultiLine" Columns="100" Rows="14" CssClass="basic" />
<asp:HtmlEditorExtender runat="server" ID="ProblemTextHtml" DisplaySourceTab="true" TargetControlID="ProblemText" />
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="ProblemText" runat="server" Text='<%# Bind("problem") %>' />
</ItemTemplate>
I have attached two images; one where the Editor renders correctly outside the DetailsView and one rendered inside the DetailsView
Comments: Sorry I think that you've put my solution in your own description of the problem.. (My poor english..)
If I copy the Textbox and HTMLEditorExtender markup and paste them outside the DetailsView it all works fine.
The code is pretty simple:
<asp:TemplateField HeaderText="Problem" SortExpression="problem" HeaderStyle-Font-Bold="true" HeaderStyle-Wrap="false" >
<EditItemTemplate>
<asp:TextBox ID="ProblemText" runat="server" Text='<%# Bind("problem") %>' TextMode="MultiLine" Columns="100" Rows="14" CssClass="basic" />
<asp:HtmlEditorExtender runat="server" ID="ProblemTextHtml" DisplaySourceTab="true" TargetControlID="ProblemText" />
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="ProblemText" runat="server" Text='<%# Bind("problem") %>' TextMode="MultiLine" Columns="100" Rows="14" CssClass="basic" />
<asp:HtmlEditorExtender runat="server" ID="ProblemTextHtml" DisplaySourceTab="true" TargetControlID="ProblemText" />
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="ProblemText" runat="server" Text='<%# Bind("problem") %>' />
</ItemTemplate>
I have attached two images; one where the Editor renders correctly outside the DetailsView and one rendered inside the DetailsView
Comments: Sorry I think that you've put my solution in your own description of the problem.. (My poor english..)