datagrid checkbox column

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Domtar
Posts: 133
Last visit: Mon Mar 11, 2024 5:38 am
Has voted: 2 times

datagrid checkbox column

Post by Domtar »

hi all,

I've created a GUI with a Datagridview that has 2 columns: 1 checkbox & 1 text

When I check if the checkbox is checked, it always returns false. I have no idea what I'm doing wrong.

I'm using this: $datagridUsers.Rows[$i].Cells[0].Value

please help. thanks!
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: datagrid checkbox column

Post by jvierra »

Here is a simple discussion that will give you an idea of how a DGV and checkbox column work and are used in code.

https://stackoverflow.com/questions/156 ... d/20981647
This topic is 2 years and 2 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked