Search found 34 matches

by derhoeppi
Sat Feb 24, 2018 11:58 am
Forum: PowerShell GUIs
Topic: Using datagrid with arraylist
Replies: 7
Views: 1423

Re: Using datagrid with arraylist

Sorry but i solved it.

Code: Select all

$NewData = $datagridview1.Rows | select -ExpandProperty DataBoundItem | % { "$($_.Name)=$($_.Value)" }
$NewData | Out-File -FilePath $PSScriptRoot\Preferences.txt
by derhoeppi
Sat Feb 24, 2018 11:48 am
Forum: PowerShell GUIs
Topic: Using datagrid with arraylist
Replies: 7
Views: 1423

Re: Using datagrid with arraylist

Thanks your last post works as expected - perfect. I want to ask you one more thing. Now i'm reading content from a textfile to a datagridview. My user should be able to edit the content. After them i want to xxport the content like the structure, so i can reimport them. The following i'm tried: $da...
by derhoeppi
Sat Feb 24, 2018 10:04 am
Forum: PowerShell GUIs
Topic: Using datagrid with arraylist
Replies: 7
Views: 1423

Using datagrid with arraylist

Hi, i'm trying to use a datagrid with an arraylist as datasource. My code looks like: $buttonRefresh_Click={ #TODO: Place custom script here $Data = [System.Collections.ArrayList](Get-Content -Path $PSScriptRoot\Preferences.txt | ConvertFrom-StringData) $datagrid1.DataSource = $Data $formMain.Refres...
by derhoeppi
Sun Oct 30, 2016 11:34 pm
Forum: PowerShell GUIs
Topic: Listview Items
Replies: 5
Views: 3619

Re: Listview Items

Thanks for your help. Now i'm able to push, change and delete items from listview element.
by derhoeppi
Fri Oct 28, 2016 8:07 am
Forum: PowerShell GUIs
Topic: Listview Items
Replies: 5
Views: 3619

Re: Listview Items

Hi,
okay this works. If i paste my Array with write-host i get the items. How is it possible to access the connected subitem?
by derhoeppi
Fri Oct 28, 2016 4:13 am
Forum: PowerShell GUIs
Topic: Listview Items
Replies: 5
Views: 3619

Listview Items

Hi,

i created a GUI with a listview. Within my code i create some listview items (with one subitem) an publish them in my listview. Now i would use the checkoption to select some items an get them in an array. How is this possible?

$array = $listview1.selecteditems

does not work.
by derhoeppi
Tue Jun 28, 2016 11:49 pm
Forum: PowerShell GUIs
Topic: datagridview import-csv
Replies: 3
Views: 1127

Re: datagridview import-csv

"This data should be variables ". Hi, i want to create a gui to modifie my the values of my variables and arrays. Because they are used in my scripts i want to deny any changes of the name from my variables and arrays. I tried your suggestion but ist not read only. Because i'm new in PowerShell Stu...
by derhoeppi
Tue Jun 28, 2016 5:11 am
Forum: PowerShell GUIs
Topic: datagridview import-csv
Replies: 3
Views: 1127

datagridview import-csv

Hi,

i Import csv data to a datagridview. This data should be variables so i want to set the first column to readonly. Is that possible?
by derhoeppi
Sun Feb 21, 2016 4:27 am
Forum: PowerShell GUIs
Topic: Open Powershell CMD Window from GUI
Replies: 4
Views: 2779

Re: Open Powershell CMD Window from GUI

Hi, thanks for your answer. You wrote from advanced programming technology. Is your example with the textbox a advance programming technic? Is it possible to open a separte Powershell session and transfer some variables to the new session? If i open a new session - i have to add all modules a second...
by derhoeppi
Sat Feb 20, 2016 6:06 am
Forum: PowerShell GUIs
Topic: Open Powershell CMD Window from GUI
Replies: 4
Views: 2779

Open Powershell CMD Window from GUI

Hi,
is it possible to open a powershell window by clicking a button. The powershell window should be in the same session like the GUI. With tith one i would to migrate my scripts in one Powershell GUI.