c# - How can I tick or untick a checkbox in a datagridview using White -
i have winforms app, displays datagridview. automatically populated bindingsource, , contains several rows of data. columns include standard things strings. of these columns checkboxes.
name | user | admin ---- ---- ----- john | x |
fred | | x
i writing automated tests using teststack.white. can read existing state of checkboxes without issue.
how set or clear checkboxes? i've tried:
table.rows[0].cells[1].value = true;
fails because underlying row/cell deleted before white can read current value.
and also:
table.rows[0].cells[1].setvalue(true);
fails set new value.
my helpful way set values? datagridview checkbox column - value , functionality:
foreach (datagridviewrow row in datagridview1.rows) { row.cells[checkboxcolumn1.name].value = true; }
or table
object?
Comments
Post a Comment