OnPopupClosing does not fire when clicked outside popup

9 posts, 0 answers
  1. Lambros
    Lambros avatar
    11 posts
    Member since:
    Oct 2007

    Posted 08 May 2009 Link to this post

    When i use the OnPopupClosing event handler it fires only when some date is selected in the popup, but not when popup is closed due to the clicking outside it. How can i process the popup closing if no date was selected in it?
  2. Lambros
    Lambros avatar
    11 posts
    Member since:
    Oct 2007

    Posted 12 May 2009 Link to this post

    it would be nice if Telerik team paid some attention to this problem
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 12 May 2009 Link to this post

    Hello Lambros,

    To attain this unsupported scenario you need to prototype PopUp's OnClick event. Here is a code snippet showing how to achieve this:
            <telerik:RadDatePicker runat="server" ID="Pciker"
                <ClientEvents OnPopupClosing="function(){alert(1);}" /> 
            </telerik:RadDatePicker> 
     
            <script type="text/javascript"
            Telerik.Web.UI.Calendar.Popup.prototype.OnClick = function(e) { 
            this.Opener.hidePopup(); 
            }  
            </script> 

    Note that the Javascript code should be placed after the RadDatePicker control.

    Kind regards,
    Georgi Krustev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. IBS Support Team
    IBS Support Team avatar
    8 posts
    Member since:
    Sep 2006

    Posted 18 Jun 2009 Link to this post

    Hi Georgi,

    What is the equivalent fix for the ASP.Net version of the control? I am hiding a combo box to work around an ie6 bug (where the combo shows through floating elements) and using the popup open and close events. I need to know when the calendar disappears regardless of whether it is by clicking a date, clicking the calendar button, or clicking away from the control.

    Thanks
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 Jun 2009 Link to this post

    Hello Jason,

    Try the following client-side code if you are using ASP.NET version of RadControls.

    JavaScript:
     
    <script type="text/javascript">  
        RadCalendarNamespace.Popup.prototype.OnClick = function(e){this.Opener.HidePopup()};  
    </script> 

    Thanks,
    Princy.
  7. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 11 Mar 2011 Link to this post

    Hello Lambros,

    Why is this not the default behaviour for this event? When you click outside of it the popup closes, shouldn't it also raise the event when this happens?
  8. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 06 Jun 2011 Link to this post

    Hi Telerik,

    I have two RadDateTimePickers. Each one fires a different event based on OnPopUpClosing and OnPopUpOpening. If I click on the first RadDateTimePicker and open a PopUp its OnPopUpOpening event fires. Click anywhere off of it causes the OnPopUpClosing to fire, except when I click on the other RadDateTimePicker (causing an OnPopUpOpening event to fire). How can I cause the first picker's OnPopUpClosing to fire before the second's OnPopUpOpening?

    Thanks

    (I'm using the above code to achieve the effect of closing when clicking away from the pop-up)
  9. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 07 Jun 2011 Link to this post

    Hi Sean,

    Could you please confirm you are using the latest version of the RadControls for ASP.NET AJAX? It is labeled 2011.1.519.

    Kind regards,
    Iana
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  10. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 07 Jun 2011 Link to this post

    Hey, I was not and the latest version resolved these issues. Thanks.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017