RadSplitButton Opens and Closes Quickly the First Time It Opens

4 posts, 0 answers
  1. Rich Reuter
    Rich Reuter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 21 Feb 2013 Link to this post

    I've got an issue where I've got a ListBox set as the RadSplitButton.DropDownContent and on the first time that the expander is clicked, the dropdown shows but then quickly hides itself.  After that, the control works as expected.

    There aren't any special behaviors attached to the control and I'm using the Windows8 theme.
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 26 Feb 2013 Link to this post

    Hello Rich,

    I tried to reproduce your issue and it seems that the code works as expected on our side. I tried it with our latest official release Q1 2013 (2013.1.0220). Can you please take a look at the attached project and check if I missed something. If you can still reproduce the issue I will need some more information to better understand your scenario.

    Which version of our binaries do you use? What is your OS and browser?

    It will be best if you can send me your project or insulate the issue in a separate solution and send it to me. Looking forward to hear from you.

    Regards,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Rich Reuter
    Rich Reuter avatar
    14 posts
    Member since:
    Aug 2012

    Posted 07 Mar 2013 Link to this post

    Sorry, I tracked the problem down to something that was happening in the codebehind. In order to have the RadSplitButton close when a selection was made, there was code to set the IsOpen property to false when the SelectionChanged event fired.  On the first time that that the splitbutton was expanded, it would change the selection index and immediately close the dropdown.

    To fix it, I'm keeping track of whether or not this is the first time that the SelectionChanged event was fired and then call IsOpen = false; when it's not the first time.

    I don't know if there's a better way to handle that or not.
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 12 Mar 2013 Link to this post

    Hello Rich,

    The approach you took is reasonable and should work correctly. However, if you encounter any other issues while working with RadControls, please don't hesitate to let us know.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top