Hello,
I have problems binding two radioButtons with a nullable bool property. Here is the code of the buttons:
<StackPanel Style="{StaticResource stackGridPadre}" Orientation="Horizontal">
<TextBlock Width="350" Style="{StaticResource txtLabel}">Precintaje</TextBlock>
<telerik:RadRadioButton Name="rbPrecintaje" IsChecked="{Binding Informe.precintaje_ok,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" GroupName="Precintaje">
<StackPanel Orientation="Horizontal">
<Image Style="{StaticResource imageRadioButton}" Source=".\..\Resources\Images\Ok_28.png"></Image>
<Label Style="{StaticResource labelRadioButton}">Si</Label>
</StackPanel>
</telerik:RadRadioButton>
<telerik:RadRadioButton GroupName="Precintaje">
<StackPanel Orientation="Horizontal">
<Image Style="{StaticResource imageRadioButton}" Source=".\..\Resources\Images\Ko_28.png"></Image>
<Label Style="{StaticResource labelRadioButton}">No</Label>
</StackPanel>
</telerik:RadRadioButton>
<TextBlock Margin="5,0,0,0" Style="{StaticResource txtLabel}" Width="75">NÂș Precinto</TextBlock>
<TextBox Style="{StaticResource estiloNormal}" Text="{Binding Informe.numero_precinto}" Width="220"></TextBox>
</StackPanel>
It works fine when i set the value of OK (the value is saved and it press the OK button when the binding is loaded)
When i set the KO value the property is set to false and save that value but when i load the property with false, the KO button is not pressed.
Is there somethin i am missing or doing wrong? Do i have to set the IsChecked property manually?
Thanks!
I have problems binding two radioButtons with a nullable bool property. Here is the code of the buttons:
<StackPanel Style="{StaticResource stackGridPadre}" Orientation="Horizontal">
<TextBlock Width="350" Style="{StaticResource txtLabel}">Precintaje</TextBlock>
<telerik:RadRadioButton Name="rbPrecintaje" IsChecked="{Binding Informe.precintaje_ok,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" GroupName="Precintaje">
<StackPanel Orientation="Horizontal">
<Image Style="{StaticResource imageRadioButton}" Source=".\..\Resources\Images\Ok_28.png"></Image>
<Label Style="{StaticResource labelRadioButton}">Si</Label>
</StackPanel>
</telerik:RadRadioButton>
<telerik:RadRadioButton GroupName="Precintaje">
<StackPanel Orientation="Horizontal">
<Image Style="{StaticResource imageRadioButton}" Source=".\..\Resources\Images\Ko_28.png"></Image>
<Label Style="{StaticResource labelRadioButton}">No</Label>
</StackPanel>
</telerik:RadRadioButton>
<TextBlock Margin="5,0,0,0" Style="{StaticResource txtLabel}" Width="75">NÂș Precinto</TextBlock>
<TextBox Style="{StaticResource estiloNormal}" Text="{Binding Informe.numero_precinto}" Width="220"></TextBox>
</StackPanel>
It works fine when i set the value of OK (the value is saved and it press the OK button when the binding is loaded)
When i set the KO value the property is set to false and save that value but when i load the property with false, the KO button is not pressed.
Is there somethin i am missing or doing wrong? Do i have to set the IsChecked property manually?
Thanks!