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:

  1. table.rows[0].cells[1].value = true;

fails because underlying row/cell deleted before white can read current value.

and also:

  1. 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

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -