or
radMultiPage_PageViewCreated(object sender, RadMultiPageEventArgs e) event fire and initialize the conntrol Requirement : when I select a item from dropdown and click add button. New tab and page view should be added. Load usercontrol Inside the page view HTML --
<asp:dropdownlist id="ddlLanguages" runat="server"> </asp:dropdownlist> <asp:linkbutton id="lbtAddLanguage" runat="server" text="Add" tooltip="Click to add this language"></asp:linkbutton> <asp:panel id="pnlOuter" runat="server"> <div id="divTab" runat="server"> <asp:label id="lblTime" runat="server"></asp:label> <rad:radtabstrip id="TabStrip" runat="server" multipageid="MultiPage" autopostback="False"> <tabs> </tabs> </rad:radtabstrip> <rad:radmultipage id="MultiPage" runat="server"> </rad:radmultipage> </div> </asp:panel>
Code --protected override void OnInit(EventArgs e) { lbtAddLanguage.Click += new EventHandler(lbtAddLanguage_Click); MultiPage.PageViewCreated += new RadMultiPageEventHandler(radMultiPage_PageViewCreated); }void lbtAddLanguage_Click(object sender, EventArgs e) { RadTab tab = new RadTab(); ListItem item = ddlLanguages.SelectedItem; tab.Text = item.Text; RadPageView view = new RadPageView(); view.ID = item.Value; tab.PageViewID = view.ID; tab.Selected = true; TabStrip.Tabs.Add(tab); MultiPage.PageViews.Add(view); }void radMultiPage_PageViewCreated(object sender, RadMultiPageEventArgs e) { Details detailControl = LoadControl(Constant.CONTROL_WIZARD_DETAILS) as Details; if (detailControl != null) { detailControl.SelectedLanguage = GetLanguage(); detailControl.LoadControls(); e.PageView.Controls.Add(detailControl); } }My issue is, When I click the button to add tabs, PageViewCreated event fires before the button click and try to Initialize all the page views. How can we stop this. Thanks

<telerik:RadImageEditor ID="ImageEditor" runat="server" ToolsFile="~/DataPages/Basic.xml" ToolsLoadPanelType="XmlHttpPanel"<br> Width="820px" Height="383px" EnableResize="false" OnImageEditing="RadImageEditor1_ImageEditing" <br> ><br> <Tools><br> <telerik:ImageEditorToolGroup><br> <telerik:ImageEditorTool CommandName="Crop" /><br> <telerik:ImageEditorToolSeparator /><br> <telerik:ImageEditorTool CommandName="MakeGrayscale" ToolTip="Make Grayscale" ImageUrl="/img/bw.png" /><br> <telerik:ImageEditorTool CommandName="RoundCorners" ToolTip="Round Corners" ImageUrl="/img/rounded.png" /><br> <br> </telerik:ImageEditorToolGroup><br> </Tools><br> </telerik:RadImageEditor>function LoadImageIntoEditor(photoID) {//Load Image $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("LoadImage*" + photoID); }
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddEditUser.ascx.cs" Inherits="Caw.ClientAccessWeb.Main.Users.AddEditUser" %><telerik:RadToolBar ID="AddEditUserToolBar" Width="100%" runat="server" OnButtonClick="AddEditUserToolBar_Click"> <Items> <telerik:RadToolBarButton runat="server" Text="Save Changes" CommandName="Save" CommandArgument="" ImageUrl="~/Main/Content/Images/Icons/check.png" CausesValidation="true" /> <telerik:RadToolBarButton runat="server" Text="Save And Add Another" CommandName="Save" CommandArgument="true" ImageUrl="~/Main/Content/Images/Icons/check.png" CausesValidation="true" Visible="false" /> <telerik:RadToolBarButton runat="server" Text="Cancel" CommandName="Cancel" ImageUrl="~/Main/Content/Images/Icons/delete.png" CausesValidation="false" /> </Items></telerik:RadToolBar><div ><div class="PageViewHeader" > <asp:Label ID="AddEditLabel" runat="server" CssClass="LabelFont"></asp:Label></div><div class="riTextBox"></div><input type="hidden" id="UserIdHidden" runat="server" /><input type="hidden" id="ClientIdHidden" runat="server" /><input type="hidden" id="CurrentUsernameHidden" runat="server" /><div style="width: 100%"> <telerik:RadTextBox ID="UsernameTextBox" runat="server" Label="Username" Width="400px" WrapperCssClass="EmailRTBWrapper" /> <asp:Label ID="UsernameRequiredImage" runat="server" Visible="true" CssClass="TelerikFont">*</asp:Label> <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UsernameTextBox" Display="Dynamic" ErrorMessage="Username is required" EnableClientScript="true" CssClass="TelerikFont" ForeColor="DarkRed" Width="45%"/> <asp:RegularExpressionValidator ID="UsernameExpression" runat="server" ControlToValidate="UsernameTextBox" ValidationExpression="" ErrorMessage="Username already exists" Display="Dynamic" CssClass="TelerikFont" ForeColor="DarkRed" /></div><div style="width: 100%"><telerik:RadTextBox ID="FullNameTextBox" runat="server" Label="Full Name" Width="400px" WrapperCssClass="EmailRTBWrapper" /><asp:Label ID="FullNameRequiredImage" runat="server" Visible="true" CssClass="TelerikFont">*</asp:Label> <asp:RequiredFieldValidator ID="FullNameRequired" runat="server" ControlToValidate="FullNameTextBox" Display="Dynamic" ErrorMessage="Full Name is required" EnableClientScript="true" CssClass="TelerikFont" ForeColor="DarkRed" /></div><div style="width: 100%"><telerik:RadTextBox ID="EmailTextBox" runat="server" Label="Email Address" Width="400px" WrapperCssClass="EmailRTBWrapper" /> <asp:RegularExpressionValidator ID="EmailExpression" runat="server" ControlToValidate="EmailTextBox" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ErrorMessage="Invalid email address" Display="Dynamic" CssClass="TelerikFont" ForeColor="DarkRed"/></div><p class="HelpText TelerikFont" style="padding-left: 5px;"><span style="font-weight:bold;">Password Requirements:</span> <%= Configuration.PasswordPolicy.ToString() %></p><div style="width: 100%"><telerik:RadTextBox ID="PasswordTextBox" runat="server" Label="Password" Width="400px" WrapperCssClass="EmailRTBWrapper" TextMode="Password" /><asp:Label ID="PasswordRequiredImage" runat="server" Visible="false" CssClass="TelerikFont">*</asp:Label> <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="PasswordTextBox" Display="Dynamic" ErrorMessage="Password is required" EnableClientScript="true" CssClass="TelerikFont" Enabled="false" ForeColor="DarkRed" /> <asp:RegularExpressionValidator ID="PasswordLengthExpression" runat="server" ControlToValidate="PasswordTextBox" ValidationExpression="" ErrorMessage="" Display="Dynamic" CssClass="TelerikFont" ForeColor="DarkRed" /> <asp:RegularExpressionValidator ID="PasswordAlphaExpression" runat="server" ControlToValidate="PasswordTextBox" ValidationExpression="^.*(?=.*[a-z]|[A-Z]).*$" ErrorMessage="Password must contain at least one alpha character" Display="Dynamic" Enabled="false" CssClass="TelerikFont" ForeColor="DarkRed" /> <asp:RegularExpressionValidator ID="PasswordNumberExpression" runat="server" ControlToValidate="PasswordTextBox" ValidationExpression="^.*(?=.*[\d]).*$" ErrorMessage="Password must contain at least one number" Display="Dynamic" Enabled="false" CssClass="TelerikFont" ForeColor="DarkRed" /> <asp:RegularExpressionValidator ID="PasswordSpecialExpression" runat="server" ControlToValidate="PasswordTextBox" ValidationExpression="^.*(?=.*[\W]).*$" ErrorMessage="Password must contain at least one special character" Display="Dynamic" Enabled="false" CssClass="TelerikFont" ForeColor="DarkRed" /> <asp:RegularExpressionValidator ID="PasswordMixedCaseExpression" runat="server" ControlToValidate="PasswordTextBox" ValidationExpression="^.*(?=.*[a-z])(?=.*[A-Z]).*$" ErrorMessage="Password must contain at least one lowercase and one uppercase letter" Display="Dynamic" Enabled="false" CssClass="TelerikFont" ForeColor="DarkRed" /></div><br /><telerik:RadButton ID="AccountLockedCheckBox" runat="server" Text="Account Locked" ButtonType="ToggleButton" AutoPostBack="false" ToggleType="CheckBox" CssClass="SettingsRadCheckBox" /><telerik:RadButton ID="Permission_OverrideIpRestrictionsCheckBox" runat="server" Text="Override IP Restrictions" AutoPostBack="false" ButtonType="ToggleButton" ToggleType="CheckBox" Visible="false" CssClass="SettingsRadCheckBox" /><input type="hidden" ID="Permission_OverrideIpRestrictionsHidden" runat="server" value="OverrideIpRestrictions" Visible="false"/><telerik:RadButton ID="PasswordExpiredCheckBox" runat="server" Text="Password Expired" ButtonType="ToggleButton" AutoPostBack="false" ToggleType="CheckBox" CssClass="SettingsRadCheckBox" /><br /><br /><telerik:RadListBox ID="ClientSourceListBox" runat="server" DataKeyField="Number" DataValueField="Id" Height="200px" CssClass="LeftListBox" ToolTip="Select Clients For The New User To Access" AllowTransfer="true" TransferMode="Move" TransferToID="ClientDestinationListBox" AllowTransferOnDoubleClick="true" SelectionMode="Multiple" /><telerik:RadListBox ID="ClientDestinationListBox" runat="server" DataKeyField="Number" DataValueField="Id" Height="200px" CssClass="RightListBox" AllowTransferOnDoubleClick="true" SelectionMode="Multiple" ToolTip="Clients The New User May Access" /><fieldset id="PermissionFieldSet" runat="server" class="rfdRoundedCorners"> <legend>Permissions</legend></fieldset><telerik:RadScriptBlock runat="server"> <script type="text/javascript"> // This function may be used as a utility or event handler function. Sender is a RadButton object from event or // ID of a hierarchy control element to find object from. function EnableOptions(sender, eventArgs) { // NOTE: The sending button handle object contains the fieldSetId in the RadButton's CommandArgument attribute var setElement = null; if ( typeof(sender) == "object" ) { // if the type is object the function was called as event handler setElement = sender; } else { // the ID was passed as a string from function called as utility setElement = $find(sender); } var fieldElement = $("#" + setElement.get_commandArgument())[0]; var cboxes = fieldElement.getElementsByTagName('a'); for (var j = 0; j < cboxes.length; j++) { var subObject = $find(cboxes[j].id); var checked = setElement.get_checked(); if (!checked) subObject.set_checked(false); subObject.set_enabled(checked); } } function LoadWindow() { <%= LoadScripts %> } $.SiteUtilities_PageLoad(function() { LoadWindow(); }); </script></telerik:RadScriptBlock></div>