This is an open forum for any mojoPortal topics that don't fall into the other categories.
Hi , Can anybody tell me how to set the editor settings while it inside repeater? I need to set the next:
SiteUtils.SetupNewsletterEditor(edIntroduction); edIntroduction.WebEditor.UseFullyQualifiedUrlsForResources = true;
Which is usualy setted in the preinit() ! 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>
another note! it even dos not bind data ! they all are - editors- empty while label is binded ! Joe any help will be appreciated thanks
Ok,
Seems it will not work, so I used another solution using AjaxExtender popup modal ! When the popoup appear the text appear in the editor then it disappear and the Editor seems not enabled for editing !!!
any help or idea ?
thank you
here my new code :
<asp:Button id="Button1" Text="" runat="server" Style="display: none;" /> <ajaxToolKit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnShowTermSubCat" PopupControlID="pnlTermSubCat" OkControlID="btnSaveTermSubCat" CancelControlID="btnCloseTermSubCat" /> <asp:Panel ID="Panel1" runat="server" Height="500px" Width="70%" style="display:none"> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <div class="modalpopup" > <div class="modalpopuptitle"> <mp:SiteLabel ID="SiteLabel245" runat="server" ForControl="" ResourceFile="AdminResource" ConfigKey="TermSubCatsSubHeaderLabel"></mp:SiteLabel>
</div> <div class="modalcontent"> <asp:HiddenField ID="HiddenField1" runat="server" Value="-1" /> <portal:mojoLabel ID="MojoLabel1" runat="server" CssClass="txterror" /> <div class="settingrow"> <mp:SiteLabel ID="SiteLabel745" runat="server" ForControl="edTermSubCatDescr" CssClass="settinglabeltight" ConfigKey="TermSubCategoryNameLabel" ResourceFile="AdminResource" /> <mp:SiteLabel ID="SiteLabel845" runat="server" ForControl="edTermSubCatDescr" CssClass="txterror needsattention" ConfigKey="StarLabel" ResourceFile="AdminResource" /> <mpe:EditorControl Enabled="true" ScrollBars="Both" ID="edTermSubCatDescr" runat="server" > </mpe:EditorControl> </div> </div> <div class="modalbuttonspane"> <div class="modalbuttonset"> <asp:Button ID="Button2" CommandName="Cancel" runat="server" CausesValidation="false" UseSubmitBehavior="false" Text="<%$ Resources:AdminResource,CloseHeader %>" CssClass="jqbutton ui-button ui-widget ui-state-default ui-corner-all" OnClick="btnCancelTermSubCat_Click" /> <asp:Button ID="Button3" CommandName="Save" runat="server" CausesValidation="false" UseSubmitBehavior="false" Text="<%$ Resources:AdminResource,ProposalUpdateTermSubCat %>" CssClass=" jqbutton ui-button ui-widget ui-state-default ui-corner-all" OnClick="btnUpdateTermSubCat_Click" /> </div> </div> </div> </ContentTemplate> </asp:UpdatePanel> </asp:Panel>
<div class="viewAfterAdd" > <div class="itinfoDataGridView"> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" > <ContentTemplate> <div class="msgnoteborder"> <portal:mojoLabel ID="MojoLabel2" Text="<%$ Resources:AdminResource,TermSubCatsSubHeaderLabel %>" runat="server" cssclass="msgnote" /> </div> <asp:DataGrid ID="DataGrid1" DataKeyField="ProposalTermSubCatID" BorderWidth="0px" CellPadding="0" AutoGenerateColumns="false" GridLines="Horizontal" runat="server" Visible="true"> <ItemStyle CssClass="dgitemstyle"/> <AlternatingItemStyle CssClass="dgaltitemstyle"/> <HeaderStyle CssClass="dgheaderstyle" /> <Columns> <asp:TemplateColumn HeaderText="<%$ Resources:AdminResource,TermSubCategoryNameLabel %>" > <ItemStyle Wrap="True"></ItemStyle> <ItemTemplate> <asp:Label ID="lblTermSubCatDescr" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TermSubCatDescr") %>' CssClass="msgnote" ></asp:Label><br />
</ItemTemplate> </asp:TemplateColumn> <asp:TemplateColumn> <ItemStyle Wrap="False"></ItemStyle> <ItemTemplate> <asp:Button ID="cmdEditTermSubCat" runat="server" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ProposalTermSubCatID")%>' OnClick="btnEditTermSubCat_Click" Text="<%$ Resources:AdminResource, EditHeader %>" ToolTip="<%$ Resources:AdminResource, EditHeader %>" CssClass="jqbutton ui-button ui-widget ui-state-default ui-corner-all" />
<asp:Button ID="cmdDeleteTermSubCat" runat="server" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ProposalTermSubCatID")%>' OnClick="btnDeleteTermSubCat_Click" OnClientClick="javascript:return confirm(confrmmsgTermSubCat);" Text="<%$ Resources:AdminResource, DeleteHeader %>" ToolTip="<%$ Resources:AdminResource, DeleteHeader %>" CssClass="jqbutton ui-button ui-widget ui-state-default ui-corner-all" /> </ItemTemplate> </asp:TemplateColumn> </Columns> </asp:DataGrid> </ContentTemplate> </asp:UpdatePanel> </div> </div>
ok,
i used : <portal:AjaxEditor Width="90%" Height="500px" runat="server" ID="edTermSubCatDescr" /> instead of mojoEditor and fornow it is temporary ok untill Joe may say any thing new
I could not find id named "edIntroduction" in your repeater control, are you missing anything?
any control inside repeater cannot be used directly otherwise it will not be found, not sure if that is the case for your problem?
stay tuning .....
Thank you henry I am sorry seems i copied the wrong pice :) actually there is like this : SiteUtils.SetupNewsletterEditor(edTermSubCatDescr); edTermSubCatDescr.WebEditor.UseFullyQualifiedUrlsForResources = true; i have many editors in the Tab page! one of them does not work inside Ajax Extender modal popup or inside repeaters !!! Which is : edTermSubCatDescr others are fine! but when i changed mojo Editor to AjaxEditor it worked! I know ajax Editor not like Mojo but i need a solution! When i use popup modal, it seems something happened in strange way! first you see the text then it disappear and you can not even access the editor but you still see the words count :) I hope maybe someone faces such issue and solved it with mojoportal!
AjaxExtender modal popup working perfect here ! thanks again
no problem, Ghalib, good to know AjaxExtender modal popup works fine now :)