RadComboBox Isenabled not working

3 posts, 0 answers
  1. Stu
    Stu avatar
    6 posts
    Member since:
    Jul 2012

    Posted 22 May 2012 Link to this post

    Hello,

    I have the following RadCombo Box:

    <telerik:RadComboBox x:Name="Combo" Grid.Column="2" Grid.ColumnSpan="4" Grid.Row="0"
         VerticalAlignment="Center"
                                         IsEnabled="False"
                                         ItemsSource="{Binding MyList}"
                                         SelectedItem="{Binding selectedItem, Mode=OneWay}"
                                         ItemTemplate="{StaticResource ComboBoxTemplate}"
                                         Command="{Binding SelectedCommand}"
                                         CommandParameter="{Binding Path=SelectedItem, ElementName=Combo }"
                                          />

    Setting IsEnabled to false does not effect the combo box at tall.

    If I removed the Command and CommandParameter from the RadComboBox then the IsEnabled Property works as expected.

    Is there a way / fix / workaround is use the isenabled property when also using a Command / Command Parameter

    Many Thanks
  2. Stu
    Stu avatar
    6 posts
    Member since:
    Jul 2012

    Posted 22 May 2012 Link to this post

    I found the issue.

    It appear that if you have set the command parameter then the commands CanExecute method will override the isenabled / isreadonly properties.

    I just have to add some logical to my CanExecute to handle the enabling / disabling.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 07 Mar 2013 Link to this post

    Thanks a lot, it's working for me
Back to Top