Creating Datagrid GUI in SAPIEN PowerShell Studio

Lets cut to the chase! Here’s a quick way to create Datagrid views using PowerShell Studio.

sapienstudio_00_2016-11-11_14-44-34

First, take advantage of the forms wizard to start building your GUI application.
Go to “File” then select “New Form” and Select a template: “Grid Template”.

sapienstudio_01_2016-11-11_14-44-34

sapienstudio_02_2016-11-11_14-44-34

This template already provide us with two buttons: “Load” and “Exit”. Take a look in the script tab and you’ll notice some events been already created for us to use. Also, read the commented lines because it give you a hint in how to populate the datagrid in the form.

sapienstudio_03a_2016-11-11_14-44-34

Now, in the commented sample, you’ll find the function “Load-DataGridView” is used to push the data to the datagrid component. This function is located at line #2 in the “#region Control Helper Functions”. Just expand the regions to view the *function:

1. ConvertTo-DataTable
2. Load-DataGridView

sapienstudio_03_2016-11-11_14-44-34

sapienstudio_04_2016-11-11_14-44-34

*Note: these functions are only available when you select the Grid template. They are not available in their Snippets section.

You can go ahead the follow the commented sample to populate the form datagrid. Uncomment the following line and run the application:

$processes = Get-WmiObject Win32_Process -Namespace "Root\CIMV2"
Load-DataGridView -DataGridView $datagridviewResults -Item $processes -AutoSizeColumns DisplayedCells

This will load the datagrid with data and you can resize the window application.

sapienstudio_05_2016-11-11_14-44-34

sapienstudio_06_2016-11-11_14-44-34

As you can seen, right from the template you can start building PowerShell Gui’s with SAPIEN PowerShell Studio product.

Download the product for a evaluation:
https://www.sapien.com/software/powershell_studio

More information about PowerShell Studio:
https://www.sapien.com/assets/pdf/PowerShell_STUDIO.pdf

Come and Celebrate PowerShell 10th Anniversary!

I just can’t believe I’ve been hooked to PowerShell since 2006. And, that I can’t stop using it.  This product change my life and it will be with us for a long time.

Here’s an image I showed on my first PowerShell presentation back in 2007 and I even build a CD with free resource information.

scritpingpathpowershell

What a accomplishment from Microsoft PowerShell father Mr. Jeffrey Snover! He created PowerShell and nowaday is mostly available in most Operating Systems: Windows, Linux, and Mac OS. Here are a few slide from one of Jeffrey Snover PowerShell webcast back in April 2007.

jsnoverpowershell1

jsnoverpowershell2

I totally got it and I couldn’t stop learning about PowerShell. It did made my work easy thanks to this new .NET Scripting Automation Technology.

Now, let us not forget about all of our existing PowerShell Communities that throughout the years has done an excellent jobs to provide guidance adn direction to everyone wanting to learn PowerShell.

Big KUDOS!!

Join Microsoft PowerShell 10 Years Anniversary Celebration

poshchannel9_2016-11-10_15-30-03

Date: November 14th 2016 (A lond day event)
Where: MSDN Channel 9 – https://channel9.msdn.com/Events/PowerShell-Team/PowerShell-10-Year-Anniversary

powershelllinuxwin_02

Keep Learning about PowerShell!

FLPSUG last meeting November 3rd posted – Windows 10 Bash and PowerShell

If you missed our online meeting, then here’s the recording.  We’ll be taking a tour into Windows 10 Bash Linux subsystem. I’ll be sharing some tips on how to work with Bash, and the workaround to make PowerShell in side BASH. This is the perfect environment to start learning about Linux while you work in windows. We’ll be take advantage of how-to use cross-platform Open source product(s).

powershelllinuxwin_02

xterm2posh_2016-11-04_10-53-19

Topic: Looking into Windows 10 Bash Linux subsystem and PowerShell

Presentation and demo info: https://1drv.ms/f/s!Akqg632FQ1xUl091qQvhMIYw9Isq