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
Parents
No Data
Reply
  • 10880
    posted

    I would log this issue with Developer Support so that they may log it with development.  You can log an issue here:

    http://devcenter.infragistics.com/Protected/SubmitSupportIssue.aspx

    The behavior you see is a symptom of the scripts not being brought in.  As for workarounds, you can place the button inside of the WARP that has the webdatechooser.  When doing so, make sure you clear the TriggerControlIDs property that references the button.  I am not sure why it works but probably has to do with where the postback initiated.  Another workaround is to place a webdatechooser on the form outside of the WARP with a style tag of display:none.  This would render the control and just hide it from view and at the same time would bring in the scripts necessary to have the dropdown function.  Alternatively you can just add the following script tags into your page to make sure it is available when the control is rendered.  When doing so, make sure to copy the appropriate scripts to the correct directories in your application. 

     <script src="scripts/ig_shared.js" type="text/javascript"></script>

    <script src="scripts/ig_webdropdown.js" type="text/javascript"></script>

    <script src="scripts/ig_calendar.js" type="text/javascript"></script>

Children