DataGridView - check a CheckBoxCell
-
can somebody help me? :confused: how can i check a checkbox in a checkbox cell? my currenty code is like that:
colValueCheckBox.TrueValue = "1"; DataGridViewCheckBoxCell cellValue = colValueCheckBox.CellTemplate.Clone() as DataGridViewCheckBoxCell; cellValue.Value = "1"; gridRow.Cells.Add(cellValue); grid.Rows.Add(gridRow);
but it doesent check the box in that cell (i need some code to check this box! - can be different to that) THNX -
can somebody help me? :confused: how can i check a checkbox in a checkbox cell? my currenty code is like that:
colValueCheckBox.TrueValue = "1"; DataGridViewCheckBoxCell cellValue = colValueCheckBox.CellTemplate.Clone() as DataGridViewCheckBoxCell; cellValue.Value = "1"; gridRow.Cells.Add(cellValue); grid.Rows.Add(gridRow);
but it doesent check the box in that cell (i need some code to check this box! - can be different to that) THNXI'm not too familiar with the DataGridView, but have you tried doing something like
cellValue.Value = true;
?Tech, life, family, faith: Give me a visit. I'm currently blogging about: Dumbest. Movie. Title. Evaaar. The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
I'm not too familiar with the DataGridView, but have you tried doing something like
cellValue.Value = true;
?Tech, life, family, faith: Give me a visit. I'm currently blogging about: Dumbest. Movie. Title. Evaaar. The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
ok thats what i already tried to check this box, too:
cellValue.Value = true; cellValue.Value = colValueCheckBox.TrueValue;
i also triedcellValue.Value = true;
without setting any TrueValue or FalseValue. i also tried to test it withThreeState = true;
. -
can somebody help me? :confused: how can i check a checkbox in a checkbox cell? my currenty code is like that:
colValueCheckBox.TrueValue = "1"; DataGridViewCheckBoxCell cellValue = colValueCheckBox.CellTemplate.Clone() as DataGridViewCheckBoxCell; cellValue.Value = "1"; gridRow.Cells.Add(cellValue); grid.Rows.Add(gridRow);
but it doesent check the box in that cell (i need some code to check this box! - can be different to that) THNX