<DataGridTemplateColumn Header="IsAdmin">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox Name="IsAdminCheckBox" IsChecked="{Binding Path=IsAdmin}" Click="IsAdmin_Click" CommandParameter="{Binding Path=Id}"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
This is the code that I have for the datagrid in my program. In the CS file, in the click event, I want to see if it will be checked whether it has changed to a mark or not checked so that I can process in the database, changing the user from admin to admin and vice versa. However, just calling IsAdminCheckBox does not work, because it cannot find it, and also calls datagridName.IsAdminCheckBox does not work. Does anyone know how to access checkbox status?
source
share