i ma new in wpf
i want search control in wpf window base i goes some problem
following my code i am right is run true way but cant be check datagrid inside check box check
<DataGrid x:Name="grdshow" TabIndex="4" AutoGenerateColumns="False" ItemsSource="{Binding}" FontSize="11" HorizontalAlignment="Left" Margin="10,41,0,0" VerticalAlignment="Top" Width="670" Height="455" IsTabStop="True" RenderTransformOrigin="0.5,0.5" FontFamily="Verdana">
<DataGrid.Columns>
<DataGridCheckBoxColumn Header="YES/NO" Width="60" x:Name="chkyesno" Binding="{Binding ACLOCK,Mode=TwoWay}" />
<DataGridTextColumn Header="NAME" Width="210" Binding="{Binding ANAME}"></DataGridTextColumn>
<DataGridTextColumn Header="ADDRESS" Width="160" Binding="{Binding AADD1}"></DataGridTextColumn>
<DataGridTextColumn Header="GROUP" Width="130" Binding="{Binding AAGROUP}"></DataGridTextColumn>
<DataGridTextColumn Header="CODE" Width="100" Binding="{Binding ACODE}"></DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
vb.net
OCcmd = New SqlCommand("SELECT ACLOCK,ANAME,AADD1,AAGROUP,ACODE from macntmst where aagroup='" & Txtacheadname.Text & "' ", sqlcn)
OCadp.SelectCommand = OCcmd
OCadp.Fill(ds_ldrLU)
dv2 = New DataView(ds_ldrLU)
grdshow.ItemsSource = dv2
grdshow.AutoGenerateColumns = False
OCcmd.Dispose()
Dim rowidx As Integer = grdshow.Items.IndexOf(grdshow.CurrentCell.Item)
MessageBox.Show("show")
For Each dr As DataRow In ds_ldrLU.Rows
Dim vl As String = dr.Item(0)
If vl = "Y" Then
TryCast(grdshow.Columns(0).GetCellContent(grdshow.Items(0)), System.Windows.Controls.CheckBox).IsChecked = True
Else
DirectCast(grdshow.Columns(0).GetCellContent(grdshow.Items(0)), System.Windows.Controls.CheckBox).IsChecked = False
End If
Next