Hi Telerik,
Got another question for you guys. I've got my own RadWindow class, and it has a design-time control on my page:
Now, I work on it's children controls in Page_Init:
This function is defined in MyPage.aspx.cs, not GlobalSettingsRadWindow.cs. This is necessary because I need to be able to have a handle on the CheckBoxes and various other controls.
I'd really like to fix this, though, as the controls are relevant to the RadWindow and not to the page.
Is there an easy way to do something like this without coupling the Page to the RadWindow class? Thinking along the lines of adding the controls to the RadWindow inside of its constructor, but how can I handle all of the various HTML markup which is not a System.Web.UI control?
Thanks
Sean
Got another question for you guys. I've got my own RadWindow class, and it has a design-time control on my page:
<cs:GlobalSettingsRadWindow ID="DashboardGlobalSettingsWindow" Runat="Server" > <ContentTemplate> <div ID="GlobalSettingsDecorationZone"> <fieldset id="RefreshProperties"> <legend>Refresh Settings</legend> <div id="RefreshArea"> <div id="RefreshLeftSide"> Auto-Refresh Enabled: <asp:CheckBox ID="AutoRefreshCheckBox" Runat="Server" /> </div> <div id="RefreshRightSide"> <telerik:RadNumericTextBox ID="AutoRefreshNumericTextBox" Runat="Server" Label="Auto-Refresh Interval (Minutes):" MaxValue="60" MinValue="1" ShowSpinButtons="True" Value="1" Width="225px" Enabled="False" LabelCssClass="riLabel LabelDisabled" DataType="System.Int32"> <NumberFormat DecimalDigits="0" AllowRounding="False" /> </telerik:RadNumericTextBox> </div> </div> </fieldset> <fieldset id="TabProperties"> <legend>Tab Settings</legend> <div id="TabPropertiesArea"> <div id="TabLeftSide"> <telerik:RadListBox ID="TabsListBox" Runat="Server" AllowDelete="True" AllowReorder="True" EnableDragAndDrop="True" Height="95px" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" Width="150px" OnClientLoad="OnClientLoad" TabIndex="1" /> </div> <div id="TabRightSide"> <telerik:RadTextBox ID="TabTextBox" Runat="Server" EmptyMessage="Enter tab name" Width="150px" /> <div id="TabButton"> <telerik:RadButton ID="TabTextApplyButton" Runat="server" Text="Add Tab" AutoPostBack="False" OnClientClicked="OnButtonClicked"> </telerik:RadButton> </div> </div> </div> </fieldset> <fieldset id="CycleProperties"> <legend>Tab Cycle Settings</legend> <div id="CycleArea"> <div id="CycleLeftSide"> Auto-Cycle Enabled: <asp:CheckBox ID="AutoCycleCheckBox" runat="server" /> </div> <div id="CycleRightSide"> <telerik:RadNumericTextBox ID="AutoCycleNumericTextBox" Runat="server" Label="Auto-Cycle Interval (Minutes):" MaxValue="60" MinValue="1" ShowSpinButtons="True" Value="1" Width="225px" Enabled="False" LabelCssClass="riLabel LabelDisabled" DataType="System.Int32"> <NumberFormat DecimalDigits="0" AllowRounding="False" /> </telerik:RadNumericTextBox> </div> </div> </fieldset> <div id="BottomButton"> <telerik:RadButton ID="ApplyGlobalSettingsButton" Runat="server" Text="Apply" AutoPostBack="False" OnClientClicked="CloseAndSave"/> </div> </div> </ContentTemplate> </cs:GlobalSettingsRadWindow>Now, I work on it's children controls in Page_Init:
private void InitializeGlobalSettings(){ //Global Settings Window Code. GlobalSettings globalSettings = StateManager.GetStates<GlobalSettings>(); if (globalSettings.RefreshEnabled) { AutoRefreshCheckBox.Checked = true; AutoRefreshNumericTextBox.Value = globalSettings.RefreshInterval; AutoRefreshNumericTextBox.LabelCssClass = "LabelEnabled"; AutoRefreshNumericTextBox.Enabled = true; } TabsListBox.Items.Clear(); foreach (RadTab tab in LayoutManager.Instance.TabStrip.Tabs) { TabsListBox.Items.Add(new RadListBoxItem {Text = tab.Text, Value = tab.Value}); } if (globalSettings.CycleEnabled) { AutoCycleCheckBox.Checked = true; AutoCycleNumericTextBox.Value = globalSettings.CycleInterval; AutoCycleNumericTextBox.LabelCssClass = "LabelEnabled"; AutoCycleNumericTextBox.Enabled = true; }}This function is defined in MyPage.aspx.cs, not GlobalSettingsRadWindow.cs. This is necessary because I need to be able to have a handle on the CheckBoxes and various other controls.
I'd really like to fix this, though, as the controls are relevant to the RadWindow and not to the page.
Is there an easy way to do something like this without coupling the Page to the RadWindow class? Thinking along the lines of adding the controls to the RadWindow inside of its constructor, but how can I handle all of the various HTML markup which is not a System.Web.UI control?
Thanks
Sean