J'utilise un DataGridViewCheckBoxCell mais je n'arrive pas à comprendre comment faire fonctionner correctement la propriété -> Value.DataGridViewCheckBoxCell est rompu pour -> Résultat
for (int i = this->dgvConfigs->Rows->Count - 1; i >= 0 ; i --){
DataGridViewCheckBoxCell^ dgvcbc = (DataGridViewCheckBoxCell^) this->dgvConfigs->Rows[i]->Cells[2];
// This is truely a weird behavior of the DataGridViewCheckBoxCell
if (dgvcbc->Value->ToString() == "True"){
// Do stuff
}
}
En ce moment je ne peux pas comprendre ce que -> Valeur pourrait être. Quand je teste
dgvcbc->Value == true
il déclenche jamais, ou
dgvcbc->Value == dgvcbc->TrueValue
Quand je regarde ces valeurs dans le débogueur les deux sont "{true}", mais l'égalité est jamais évaluée à true
I même essayé
dgvcbc->TrueValue = true;
dgvcbc->Value == dgvcbc->TrueValue
à nouveau, les deux apparaissent comme "{true}", mais le // Do Stuff est jamais égalé