Request for help with DataGridView, (Header) Checkboxes, Check/Uncheck all and Loops

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 5 years and 7 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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Request for help with DataGridView, (Header) Checkboxes, Check/Uncheck all and Loops

Post by jvierra »

That is a lot of explaining but there is no question. What is the question?

You explanation is not a design or anything that can be used to write code. It is just a long wish list of what you might want to do.

To write code and especially to write code for forms we need to have a design. A design is driven by "use" cases. Start by writing down the things you need to do and what the operator will do to make those things happen. This will tell you how to design the GUI.

Here is a good primer to get you started with tool design: https://info.sapien.com/index.php/guis/ ... nistrators

Here are some articles that address specific issues of design and implementation: https://info.sapien.com/index.php/guis/gui-scripting
EnhancedDeflate
Posts: 8
Last visit: Wed Nov 08, 2023 1:18 pm

Re: Request for help with DataGridView, (Header) Checkboxes, Check/Uncheck all and Loops

Post by EnhancedDeflate »

jvierra I needed three things initially, and of course these were just points on my list of what I wanted to do.
  • Ask for a checkbox in the header column
  • Ask for a way to loop through all DGV rows and look for checked items
  • Refresh the DGV after it's looped through from top to bottom completely
As for the first list item you kind of replied that I can only work around this. Already have something in my mind ...
The second point/question is also basically answered.
The third question is "Can I refresh the DGV contents after I have looped through it once?" would then still be open.

Anyway I don't feel like asking anymore, at least not here. It's like you're trying to take all my words 1:1 literally and I don't even try to understand.
Really, I am keen to look at more examples and I am thankful for the links, but also we've reached a point where I don't know what I should be explaining any further. In my opinion I made clear what my use case is so please don't bother being any more condescending. Maybe someone else would freshen up this dialogue - or not.

Thank you for your help so far.
ED
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Request for help with DataGridView, (Header) Checkboxes, Check/Uncheck all and Loops

Post by jvierra »

I am just trying to nudge you towards being clear enough to understand. I know you are not a programmer and have no experience with forms but clarity is critical in a technical environment.

Your last post uncovered something that was not at all clear in the previous posts.

"•Refresh the DGV after it's looped through from top to bottom completely"

If the DGV was data bound then it would refresh automatically when the DataTable was refreshed. For your task you need to re-query the objects and re-assign the DataTable.

The other two items I answered a long time ago but you didn't see it.

In technical design we do want to be "literal". Non-technical and colloquial references are seldom helpful.

In many years of programming Windows in C, C__, C#, VB, VB.Net and other languages I have found that even experienced programmers are baffled by Windows Forms. Don't feel bad as you are starting out without any programming experience and taking on a big technical hurdle. You will learn but it will take some time. Be patient.

Good luck
This topic is 5 years and 7 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