Question Powershell - how to programmatically check and uncheck checkboxes in a datagridview table whose final column is of type boolean

corinthos

Golden Member
Mar 22, 2000
1,858
2
81
Hi all, I have a powershell program that uses a GUI and a tab control. On one of the tabs is a datagridview that shows a table. The column's data is of type Boolean and a checkbox is in each row's last column.

When I use datagrid1.currentrow.column['checkbox'].value = $true (or $false), for example, the value does change when I check it with a write-host command to verify. However, it doesn't programmatically check the checkbox or uncheck it if it was previously checked.

Do I have to loop thru the tab control and then the datagridview cells in order to access something like checkbox.checked or checkbox.unchecked? Or how can I programmatically get the checkbox to be checked or unchecked?

Thanks in advance!