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

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -