In my wpf app, I have a datagrid as follows
<Custom:DataGrid x:Name="dg_nba" IsEnabled="{Binding Iseditmode}" SelectionMode="Single" ItemsSource="{Binding Products}" Style="{DynamicResource myDataGridStyle}" IsReadOnly="True" AutoGenerateColumns="False" CanUserAddRows="False" ColumnWidth="*">
<Custom:DataGrid.Columns>
<Custom:DataGridTextColumn x:Name="dgt_nba_id" Header="Id" Binding="{Binding ID}" MaxWidth="40"/>
<Custom:DataGridTextColumn x:Name="dgt_nba_name" Binding="{Binding Name}" Header="Name"/>
<Custom:DataGridTemplateColumn x:Name="dgtc_nba_incl" Header="Include" MaxWidth="50">
<Custom:DataGridTemplateColumn.CellTemplate >
<DataTemplate>
<CheckBox HorizontalAlignment="Center" Style="{DynamicResource myCheckBoxStyle}"/>
</DataTemplate>
</Custom:DataGridTemplateColumn.CellTemplate>
</Custom:DataGridTemplateColumn>
</Custom:DataGrid.Columns>
</Custom:DataGrid>
I have binded the datagrid id , name column with the Default collection of Products. I have another collection of product list which has only the products included, Now i need to check the checkbox if the list contains the product.
Can someone help me with the Collection to boolean converter. I tried my best but wasnt able to get it right.
Thanks in advance.