Search found 416 matches

by stevens
Tue May 05, 2020 8:21 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 23
Views: 1938

Re: ConvertDataset for GridView 'Invalid storage type: DBNull.'

Note: I also use filters

-$dataset = $dataset | Where-Object { $values -notcontains ...
Load-DataGridView -DataGridView $datagridview1 -Item $dataset
by stevens
Tue May 05, 2020 8:20 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 23
Views: 1938

Re: ConvertDataset for GridView 'Invalid storage type: DBNull.'

Found out what the issue was, I do all kinds of filtering of the dataset, that makes that sorting isn't working anymore. Load-DataGridView -DataGridView $datagridview1 -Item $($dataset | sort name) does not work Load-DataGridView -DataGridView $datagridview1 -Item $dataset Works fine = sorting works...
by stevens
Tue May 05, 2020 7:09 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 23
Views: 1938

Re: ConvertDataset for GridView 'Invalid storage type: DBNull.'

Yes I know, I should click the column header, but nothing happens.

>If the DataTable is correctly bound to the table then it is sortable.
How can I check this?
by stevens
Tue Apr 28, 2020 4:54 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 23
Views: 1938

Re: ConvertDataset for GridView 'Invalid storage type: DBNull.'

It is working fine now with the input you provided, thanks! $dt = [System.Data.DataTable]::new() $dt.Load($reader) $conn.Close() return ( ,$dt) The columns are clickable, they focus and change color when I hover over them, so I guess it is shown as datatable but they really do not sort, whatever col...
by stevens
Fri Apr 24, 2020 7:33 am
Forum: PowerShell GUIs
Topic: Run a PSscript with other credentials, capture the output/debug as admin?
Replies: 5
Views: 302

Re: Run a PSscript with other credentials, capture the output/debug as admin?

Thanks for the input. I had a typo, will get back with details later on to finetune if needed.
by stevens
Fri Apr 24, 2020 6:49 am
Forum: PowerShell GUIs
Topic: Buildversion, use exeversion to show in GUI?
Replies: 8
Views: 1640

Re: Buildversion, use exeversion to show in GUI?

It worked fine, but it appears my GUI throws errors on that code all the time. When running the GUI via console, I see errors all the time which makes that my gui takes up to a minute to load :-( l\Globals.ps1:330 char:29 + $RuntimeFileInfo = Get-Item $hostinvocation.MyCommand.path + ~~~~~~~~~~~~~~~...
by stevens
Fri Apr 24, 2020 3:59 am
Forum: PowerShell GUIs
Topic: Running project takes 1 minute
Replies: 16
Views: 1013

Re: Running project takes 1 minute

See https://www.sapien.com/forums/viewtopic.php?f=21&t=14566 The code Nillth provided is exactly what I am using $RuntimeFileInfo = Get-Item $hostinvocation.MyCommand.path $RuntimeVersion = $($RuntimeFileInfo.VersionInfo.ProductVersion) As mentioned, it works fine, the $RunTime version shows correct...
by stevens
Fri Apr 24, 2020 2:11 am
Forum: PowerShell GUIs
Topic: Running project takes 1 minute
Replies: 16
Views: 1013

Re: Running project takes 1 minute

Thanks. When I look back in the posts I don't see it. I'm probably overlooking it then. --- Now I know why the GUI loads slow. It is new code that was suggested on this forum. I'm using $form.text = "Running $RuntimeVersion" which is showing the version fine in the GUI. I get the $RuntimeVersion fro...