hi all,
in my GUI, I have a datagridview to display some information to the user. That datagrid has 2 columns;
a DataGridViewCheckBoxColumn and a DataGridViewTextBoxColumn
I need to read the value into the text cell whenever a user clicks in the checkbox to make his selection.
I am unable to retrieve the value of the text cell when the checkbox value changes to $True.
here’s my try of it;
$datagridNotMembers_Click = { $rowIndex = $datagridNotMembers.SelectedCells.RowIndex $Name = $datagridNotMembers.Rows[$rowIndex].Cells[1].Value if ($datagridNotMembers.Rows[$rowIndex].Cells[0].Value -eq $True){ Out-File -FilePath c:\Temp\nametest.txt -InputObject $Name } }
if I get the value of $datagridNotMembers.Rows[$rowIndex].Cells[0].Value, it is empty. how can I check if the checkbox is checked or not?
thank you!