Maharudra Gadekar

Maharudra Gadekar

  • 1.4k
  • 367
  • 83.1k

How to find control in datagrid in wpf?

Jul 24 2019 11:43 PM
Hi,
 
I am using datagrid in wpf, but i dont no how to find control in button click?
 
<DataGrid Name="grdregisterdata" AutoGenerateColumns="False" HorizontalAlignment="Center" Height="500"
VerticalAlignment="Top" Width="900">
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Width="100" Binding="{Binding Name}" />
<DataGridTextColumn Header="Address" Width="100" Binding="{Binding Address}"/>
 
<DataGridTemplateColumn Header="Action">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox Name="chkdelete" IsChecked="{Binding RID,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Margin="2" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
 
this is my datagrid code, and i want to find checkbox control in button click.
 please help me.
 
thanks in advance 
 

Answers (1)