Prevent RadDropDownButton DropDown from closing

4 posts, 0 answers
  1. NR
    NR avatar
    17 posts
    Member since:
    Oct 2009

    Posted 21 Sep 2010 Link to this post

    Since it seems my other post has been ignored, I will post a fresh thread with the relevant information.

    I'm working with the RadDropDownButton. Inside the DropDownContent I have some RadDateTimePickers. I want to prevent the DropDown from closing unless all of the RadDateTimePickers have data.

    Getting the values from the RadDateTimePickers is no a problem. I can send a messagebox to the user letting them know that all the boxes must be filled in before they can continue. The problem however is that there is no DropDownClosing event. Only a DropDownClosed. I tried setting the DropDown.IsOpen = true in the DropDownClosed event but that does absolutely nothing for me.

    What I really need is a DropDownClosing event that I can cancel from propagating any further. According to the other thread where I posted, this was supposed to have been fixed in the Q3 2009 release. I'm running with the latest official release and it still has no DropDownClosing event or any way to prevent the dropdown from closing as far as I can tell.

    Any help would be GREATLY appreciated as this is semi-holding up my project from moving forward.
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 22 Sep 2010 Link to this post

    Hi Nathan Raleigh,

     Unfortunately there is no Closing event in the DropDownButton yet. I have added this issue in our PITS under the name "DropDownButton: Add Closing event" and it will be ready for tracking and voting tomorrow the latest.
     You can examine the attached project and see if this approach works for you.

    Kind regards,
    Zarko Vidolov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. NR
    NR avatar
    17 posts
    Member since:
    Oct 2009

    Posted 22 Sep 2010 Link to this post

    While that seems to help slightly, there are some other issues that this whole thing causes.

    One way I found that will actually mostly fix my issue is to be able to access the DropDownPopupWrapper inside the RadDropDownButton.. however this is "hidden".

    If I put a breakpoint in my code and manually set the DropDownPopupWrapper.CloseOnOutsideClick = false (instead of the default true) it fixes the other part of my problem. However I do not seem to have any programmatic access to the DropDownPopupWrapper or the CloseOnOutsideClick property within it.

    The problem I'm experiencing at the moment (besides the closing event) is that because my DropDownContent has a few RadDateTimePickers in it, after I pick the DateTime and click off that new Calendar that pops up, it seems to call the DropDown.Closed event even though I didn't want it closed, and I actually DID click within the DropDown Content and it STILL fired that event. Setting the CloseOnOutsideClick property to "false" alleviates that particular problem. Between being able to set CloseOnOutsideClick to false and the workaround provided to Invoke the IsOpen = true I think it would provide a sufficient workaround until a real solution is put into place to catch the Closing event.

    Basically, I want the DropDown to only be opened/closed by the button itself, not by any other outside source. Currently the PopupWrapper prevents that from happening. Is there any good reason that those Popups and PopupWrappers are not exposed to the RadDropDownButton class?
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 23 Sep 2010 Link to this post

    Hi Nathan,

     We've looked into that problem and we'll add Closing event and KeepOpen property in the next internal build.
    DropDownPopupWrapper is a part of the internal logic of the DropDownButton and it can not be exposed, but with the new event and property I think you won't need it.

    Best wishes,
    Zarko
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top