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

RadButton Markup

2 Answers 68 Views
This is a migrated thread and some comments may be shown as answers.
Stuart Hemming
Top achievements
Rank 2
Stuart Hemming asked on 31 Oct 2010, 03:16 PM
I have a suggestion or two about the mark-up for the RadButton control.

At the moment, it is possible to include the ToggleStates element for a standard or link button. Likewise, it is possible to set the ToggleType attribute. What I'm about to suggest will, I think, make the mark-up a little more logical and, potentially, improve the functionality of the control overall.

First, I think that you should remove the "ToggleButton" option from the ButtonType attribute. A RadButton would be either a StandardButton or a LinkButton. The button (standard or link) takes on ToggleButton properties if it has a <ToggleStates> child element.

By default an RadButton would be a StandardButton unless, either, the ButtonType="LinkButton" or the <RadButtonToggleState> elements had a ImageUrl property.

The ToggleType property should be moved to the <ToggleStates> element as it has no relevance unless the button is to function as a ToggleButton.

So, you'd define a standard button with or without icons pretty much as you do now, and the same would go for a link button. But either (and the visual appearance wouldn't change unless the developer wanted it to) could be made in to a ToggleButton by simply adding <RadButtonToggleState> elements to the button's <ToggleStates> element. Creating a custom toggle button, like those in your examples, would work in the same way, but the user now has access to a standard-looking button that will toggle through a set of states just changing the text, or the icon or both.

I'm fairly confident that someone will tell me that it's too late now to change the code for the release of Q3, but I hope not. If, however, it is, I hope that you would consider introducing these changes, or something like them in a future release..

-- 
Stuart

2 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 04 Nov 2010, 09:36 AM
Hello Stuart,

Thank you for the valuable feedback!

You are right, the users should have the ability to use the functionality of a ToggleButton and have the look of a StandardButton. So, we will do our best to make this possible for the coming Q3 2010 release.

Most probably the ToggleButton option will be dropped from the RadButtonType, and we will introduce another way to use the "toggle button" functionality.

Sincerely yours,
Pero
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
0
Stuart Hemming
Top achievements
Rank 2
answered on 04 Nov 2010, 10:31 AM
Pero,

Thank you for the valuable feedback!
No worries.

> You are right, the users should have the ability to use the functionality of a ToggleButton
> and have the look of a StandardButton
Cool. I already have a specification document written for work that needs this functionality! So, bring it on! 

> Most probably the ToggleButton option will be dropped from the RadButtonType, and we
> will introduce another way to use the "toggle button" functionality
As I suggested, a nice obvious way would just be to allow the existence of a non-empty <ToggleStates> collection control that.

In any event, thanks for listening.

-- 
Stuart
Asked by
Stuart Hemming
Top achievements
Rank 2
Answers by
Pero
Telerik team
Stuart Hemming
Top achievements
Rank 2
Share this question
or