Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Setting WebDateChooser Visibility Inside WebAsyncRefreshPanel
posted

Hello,

I've noticed some strange behavior with the WebDateChooser control when its visibility property is changed while it is inside a WebAsyncRefreshPanel. The control appears but the user cannot select a date. To duplicate this behavior, create a web form and add the following code.

        <asp:Button ID="Button1" runat="server" Text="Show WebDateChooser"
            onclick="Button1_Click" />
        <br /><br />
        <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server"
            TriggerControlIDs="Button1">
            <igsch:WebDateChooser ID="WebDateChooser1" runat="server" Visible="false"/>
        </igmisc:WebAsyncRefreshPanel>

Then add the following event handler to the codebehind file:

        protected void Button1_Click(object sender, EventArgs e)
        {
            WebDateChooser1.Visible = true;
        }

Run the project, then click the "Show WebDateChooser" button.  The WebDateChooser control will appear but will not function.

I've also attached a sample project to illustrate this issue. In the sample project, the WebDateChooser control is part of a simple composite control (but this doesn't appear to matter).

CompositeControlTest.rar