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.
User avatar
jvierra
Posts: 13732
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: clearing data in a datagridview without exiting form

Post by jvierra » Thu Oct 11, 2018 10:21 am

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 25 times

User avatar
jsira2003@yahoo.com
Posts: 112
Joined: Fri Apr 07, 2017 9:47 am

Re: clearing data in a datagridview without exiting form

Post by jsira2003@yahoo.com » Thu Oct 11, 2018 12:35 pm

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

Locked