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

RadButton disabled by default?

3 Answers 184 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Craig Mellon
Top achievements
Rank 1
Craig Mellon asked on 23 Nov 2010, 10:24 AM

I've installed the latest internal build of the controls to fix an issue with the RadbusyIndicator, but have noticed a problem with the RadButton.  I have 2 modal windows which have a cancel button which is a RadButton.  I've not made any changes to these 2 screens apart from updating to the internal build dll, now the cancel buttons are disabled, below is my declaration:

I'm current using the following build:   2010.3.1119.1040

 

 


 

<telerik:RadButton Content="Cancel"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"                                               
        telerik:Theming.Theme="Windows7"
        Command="telerik:WindowCommands.Close" 
        Margin="5" Padding="10,5" />

3 Answers, 1 is accepted

Sort by
0
Craig Mellon
Top achievements
Rank 1
answered on 23 Nov 2010, 10:42 AM
I have set IsEnabled to true in the XAML but when i run the project the button is still disabled. 

I have another button on the screen which sets the IsEnabled property with databinding and this button works correctly as below:

<telerik:RadButton Content="Add Note"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        telerik:Theming.Theme="Windows7" Margin="5" Padding="10,5"
        IsEnabled="{Binding NewNote.IsValid}" Name="RadButton1" />


But this code does not work:
<telerik:RadButton Content="Cancel"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"                                               
        telerik:Theming.Theme="Windows7"
        IsEnabled="True"
        Command="telerik:WindowCommands.Close" 
        Margin="5" Padding="10,5" />
0
Craig Mellon
Top achievements
Rank 1
answered on 23 Nov 2010, 10:49 AM
The problem seems to be with the CommandBinding, if I remove the command binding the button is enabled.

I have checked the window declaration and the CanClose property was set to false (this was set to hide the close button).  It seems that with the latest version the WindowCommand.Close command is using this to enable/disable the button.

My issue is now resolved so please ignore this post.

0
Charles
Top achievements
Rank 1
answered on 19 Mar 2013, 01:29 PM
Thanks, that really helped me out!
Tags
Buttons
Asked by
Craig Mellon
Top achievements
Rank 1
Answers by
Craig Mellon
Top achievements
Rank 1
Charles
Top achievements
Rank 1
Share this question
or