I have added checkbox in datagridview and I want check whether an item is checked or not but I am little bit confuse how to accomplish it.
This is Xmal code
<DataGrid.Columns>
<DataGridTemplateColumn Header="#">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox x:Name="checkboxinstance" Checked="checked_it" Unchecked="unchecked_it"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding apiName }" Header="Name" />
</DataGrid.Columns>
This is behind the code
private void checked_it(object sender, RoutedEventArgs e)
{
List<CheckBox> checkBoxlist = new List<CheckBox>();
foreach (CheckBox c in checkBoxlist)
{
//what I add here
}
}
If anyone know solution kindly help
Aucun commentaire:
Enregistrer un commentaire