clearing data in a datagridview without exiting form

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 6 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: clearing data in a datagridview without exiting form

Post by jvierra »

What kind of objects are returned by this command? Is it a PowerShell script that returns objects? If you just create the DGV in the designer it can be reloaded using the method I posted from any correct collection of objects.

See the attached demo to see how this works.
Attachments
Delm-DGVClear.psf
(28.85 KiB) Downloaded 114 times
User avatar
jsira2003@yahoo.com
Posts: 117
Last visit: Tue Jul 11, 2023 6:18 am

Re: clearing data in a datagridview without exiting form

Post by jsira2003@yahoo.com »

The object returned is a system.collections.arraylist. I figure this is perfect for the datagridview. I am going to give all of this a try soon. Hope I have better success!

thank you,
John
This topic is 5 years and 6 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