This is a migrated thread and some comments may be shown as answers.

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

2 Answers 50 Views
Expander
This is a migrated thread and some comments may be shown as answers.
Jonathon
Top achievements
Rank 1
Jonathon asked on 26 Aug 2011, 01:14 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 31 Aug 2011, 02:34 PM
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 >>

0
Jonathon
Top achievements
Rank 1
answered on 31 Aug 2011, 10:11 PM
Thanks!

Jonathon
Tags
Expander
Asked by
Jonathon
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Jonathon
Top achievements
Rank 1
Share this question
or