Is it possible to have a button not in the header bound to the RadExpander button so when clicked will expand?

3 posts, 1 answers
  1. Jonathon
    Jonathon avatar
    50 posts
    Member since:
    Aug 2011

    Posted 25 Aug 2011 Link to this post

    Hi,

    I was wondering if it was possible to have a button on one side of the page, when clicked, will call the RadExpander on the other side of the page to expand. Basically, what I'm going for is binding a button to the radexpander button. So when it expands, it will open a form and within that form there will be a cancel and submit button, and if they hit the cancel or submit button, then the radexpander will close. Is it possible to not even have the expander button and have another button act as one so there will be nothing in the header? And they won't see that something is going to expand on the other side of the page?

    Hopefully that made sense.

    Thanks,

    Jonathon
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 31 Aug 2011 Link to this post

    Hi Jonathon,

    You can edit the default ControlTemplate of the RadExpander and set the HeaderButton element Visibility to Collapsed. This way teh RadExpander header will be hidden. Than you can control the IsExpanded property of the control through a button click.

    I attached a sample project to get you started. The same approach can be implemented in an MVVM approach by binding the RadExpander.IsExpanded property to a business property and then use a command to control this property in the view model through the button Command. Please have a look at the sample and let me know if this is what you had in mind.

    Greetings,
    Tina Stancheva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  3. DevCraft banner
  4. Jonathon
    Jonathon avatar
    50 posts
    Member since:
    Aug 2011

    Posted 31 Aug 2011 Link to this post

    Thanks!

    Jonathon
Back to Top