Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Checked only specific checkbox
posted

I want to check the specific checkbox on xamdatagrid only. When i click on the specific row, only the checkbox on that row is checked. How can i achieve this?

======XAML======

<Grid.Resources>
<Style x:Key="CheckboxStyle" TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<!--<CheckBox IsEnabled="True" Content="{Binding IsCheckedBoolean}" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Value, Mode=TwoWay}" Command="{Binding BooleanType}" CommandParameter="{Binding IsCheckedBoolean, RelativeSource={RelativeSource Self}, UpdateSourceTrigger=PropertyChanged}" />-->
<CheckBox IsChecked="{Binding DataContext.IsCheckedBoolean, RelativeSource={RelativeSource AncestorType={x:Type igDP:XamDataGrid}}}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Grid.Resources>

<igDP:UnboundField Label="Action" Width="auto">
<igDP:UnboundField.Settings>
<igDP:FieldSettings CellValuePresenterStyle="{StaticResource CheckboxStyle}" />
</igDP:UnboundField.Settings>
</igDP:UnboundField>

=======View Model======

public Boolean IsCheckedBoolean
{
get { return _isChecked; }
set
{
_isChecked = value;
RaisePropertyChanged("IsCheckedBoolean");
}
}

Parents Reply Children