Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

How to have RadioButtons with Checkbox Icon Style

$
0
0

Following code displays as per attached screenshot "Radio Button style" and has Radio like behaviour IE Check a button and the other unchecks:

 

<telerik:RadButtonID="RadButtonTile"runat="server"ToggleType="Radio"ButtonType="ToggleButton"Skin="BlackMetroTouch"Text="tile view"
                       GroupName="Radios"AutoPostBack="false"Checked="true"Height="32px">
                   </telerik:RadButton>
                   <telerik:RadButtonID="RadButtonList"runat="server"ToggleType="Radio"ButtonType="ToggleButton"Skin="BlackMetroTouch"Text="list view"
                       GroupName="Radios"AutoPostBack="false"Height="32px">
                   </telerik:RadButton>

The radio behaviour is what I want, but would prefer to use the square like icons that the Checkbox style provides in BlackMetroTouch skin. I can achieve the desired style as per attached screenshot "Checkbox Style" using the following code.  However the Radio Button behaviour is lost:

<telerik:RadButtonID="RadButtonTile"runat="server"ToggleType="CustomToggle"ButtonType="ToggleButton"Skin="BlackMetroTouch"Text="tile view"
                        GroupName="Radios"AutoPostBack="false"Checked="true"Height="32px">
                        <ToggleStates>
                            <telerik:RadButtonToggleStatePrimaryIconCssClass="rbToggleCheckboxChecked"/>
                            <telerik:RadButtonToggleStatePrimaryIconCssClass="rbToggleCheckbox"/>
                        </ToggleStates>
                    </telerik:RadButton>
                    <telerik:RadButtonID="RadButtonList"runat="server"ToggleType="CustomToggle"ButtonType="ToggleButton"Skin="BlackMetroTouch"Text="list view"
                        GroupName="Radios"AutoPostBack="false"Height="32px">
                        <ToggleStates>
                            <telerik:RadButtonToggleStatePrimaryIconCssClass="rbToggleCheckbox"/>
                            <telerik:RadButtonToggleStatePrimaryIconCssClass="rbToggleCheckboxChecked"/>
                        </ToggleStates>
                    </telerik:RadButton>
 

Is there anyway to include the Radio Button behaviour with the desired checkbox style?

 

Thanks

 


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>