i want to get the value of CheckBoxColumn in DataGrid wpf
i try this code
foreach
(spShowTotal_Result item
in
dgShowStudent.ItemsSource)
{
bool
? check = ((CheckBox)dgShowStudent.Columns[0].GetCellContent(item)).IsChecked;
}
Unable to cast object of type 'System.Windows.Controls.ContentPresenter' to type 'System.Windows.Controls.CheckBox'.