Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

TinyMCE editor in gridview control

$
0
0

Hello All,

I have a gridview and am using TinyMCE control inside it. I came to know that TinyMCE doesn't work well with Updatepanel. I tried adding the control in page load as suggested here http://www.tinymce.com/forum/viewtopic.php?id=6034

However, it doesn't work. The problem being, it doesn't recognize the text box.

<script src="tinymce/jscripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
    
<script type="text/javascript">
       tinyMCE.init({ mode: "textareas", theme: "advanced" });
       function InitTiny() { tinyMCE.execCommand('mceAddControl', false, 'ctl00_body_content_txtDescComments'); }   
    </script>   

<asp:UpdatePanel ID="UpdatePanel4" runat="server" UpdateMode="Always">
                        <ContentTemplate>
                            <asp:GridView ID="GV_CandDesc" runat="Server" AutoGenerateColumns="False"
                                AutoGenerateEditButton="true" BackColor="White" BorderColor="#DEDFDE"
                                BorderStyle="None" BorderWidth="1px" CellPadding="4" DataKeyNames="emplid"
                                EnableViewState="True" ForeColor="Black" GridLines="Vertical"
                                OnRowCancelingEdit="CancelCand_descRecord" OnRowCommand="GV_DescRowCommand"
                                OnRowEditing="EditCand_DescRecord" OnRowUpdating="UpdateCand_descRecord"
                                ShowFooter="false" SkinID="RecordList" Width="100%">
                                <Columns>
                                    <asp:TemplateField HeaderText="Comments" ItemStyle-CssClass="infotitle1">
                                        <ItemTemplate>
                                                                                        
                                            <%# DataBinder.Eval(Container.DataItem,"cand_desc") %>
                                            
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                        <%--<img id="Word" runat="server" src='../images/Word.jpg' title="Spellcheck" onclick="javascript: CheckSpelling();" />
                                        <i>(Click to check spelling)</i>
                                            <cc1:Editor ID="txtDescComments" runat="server" Content='<%# Bind("cand_desc") %>'/>--%>
                                           <asp:TextBox ID="txtDescComments" runat="server"
                                           Height="100" TextMode="MultiLine"  
                                           Width="400" Text='<%# Bind("cand_desc") %>' />
                                           
                                                                                      
                                        </EditItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    

Any help would be very appreciated. I have tried to work a solution for the past whole week


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>