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
560
Hiding WebDatePicker control from server side
posted

Hi,

Is there a way to hide WebDatePiceker control from server side? If I set visibility to false, control is not rendered so I can not unhide it from UI side. I would like to avoid adding some additional containers and then changing their visibility.

Thanks

Parents
  • 8736
    posted

    Hello,

    In order to hide/show control from on client side you need to hide control in the client side Initialize event of WebDatePicker as shown below:

    function WebDatePicker1_Initialize(sender, eventArgs) {

    sender.set_visible(false);

     }

    <ig:WebDatePicker ID="WebDatePicker1" runat="server" ClientIDMode="Static"> <ClientSideEvents Initialize="WebDatePicker1_Initialize" /> </ig:WebDatePicker>

    You can unhide the control later in client side script as below:

    var datepicker = $find("WebDatePicker1");

     datepicker.set_visible(true);

    I hope this helps.

Reply Children
No Data