本文介绍了内置编辑器内置中继器安装程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi ,
Can anybody tell me how to set the editor settings while it inside repeater?
t even dos not bind data !
they all are - editors-  empty while label is binded !
I need to set the next:



            SiteUtils.SetupNewsletterEditor(edIntroduction);
            edIntroduction.WebEditor.UseFullyQualifiedUrlsForResources = true;

Which is usualy setted in the preinit()  in pages events!
any ideas will be appreciated
my code seems like this :


<asp:Repeater ID="TermsMatrixRepeater" runat="server" ViewStateMode="Enabled"  >
<ItemTemplate>

        <div class="categoryListTitle">
            <asp:TextBox ID="txtTermCat" width="200" MaxLength="250"  CssClass="verywidetextbox forminput" runat="server" Text='<%# Eval("TermCat") %>'  Visible="false"></asp:TextBox>
        </div>

        <asp:Repeater   ViewStateMode="Enabled" ID="rptTermSubCategory" DataSource='<%# ((DataRowView)Container.DataItem).Row.GetChildRows("TermSubCat_TermCat")%>' runat="server"  >
            <ItemTemplate>
                <div class="subCategoryListSection">
                            <mpe:EditorControl ID="edTermSubCatDescr" runat="server" Text='<%# ((DataRow)Container.DataItem)["TermSubCatDescr"] %>'   Visible="false" ></mpe:EditorControl>
                </div>
            </ItemTemplate>
        </asp:Repeater>

</ItemTemplate>
</asp:Repeater>







-----------



我尝试了下一个但是在我在第二个重复器中添加OnItemDataBound =RptTermSubCategory_ItemDataBound后它不起作用:






-----------

I tried the next but it does not works after i added OnItemDataBound="RptTermSubCategory_ItemDataBound" in the second repeator:

protected void RptTermSubCategory_ItemDataBound(object sender,
       System.Web.UI.WebControls.RepeaterItemEventArgs e)

       {

           if (e.Item.ItemType == ListItemType.Item ||
               e.Item.ItemType == ListItemType.AlternatingItem)

           {



               EditorControl editor =((EditorControl)e.Item.FindControl("edTermSubCatDescr"));
               if (editor != null)
               {
                   //editor = SubCatItem.FindControl("edTermSubCatDescr") as EditorControl;
                   editor.WebEditor.ToolBar = ToolBar.Newsletter;
                   editor.WebEditor.FullPageMode = true;
                   editor.WebEditor.EditorCSSUrl = string.Empty;

                   editor.WebEditor.Width = Unit.Percentage(90);
                   editor.WebEditor.Height = Unit.Pixel(500);

                   SiteUtils.SetupNewsletterEditor(editor);
                   editor.WebEditor.UseFullyQualifiedUrlsForResources = true;

               }

           }

       }





它创造了所有这些但不影响它们!



it founds all of them but did not affect on them !

推荐答案




这篇关于内置编辑器内置中继器安装程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 02:13