Search found 382 matches

by stevens
Thu Feb 20, 2020 5:43 am
Forum: PowerShell GUIs
Topic: Buildversion, use exeversion to show in GUI?
Replies: 1
Views: 849

Buildversion, use exeversion to show in GUI?

Hi, I convert my powershell GUI into an exe/msi and use the 'auto-increment' of exe, then use exe for version in msi. First: if generating MSI, should I first generate exe or will the msi creation generate the exe (I think I should, but just checking)? Second: I'd like to show the version in the for...
by stevens
Thu Feb 20, 2020 4:31 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 7
Views: 965

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

Thanks! I'm getting my data from sql using a Powershell function, the one below. So then I have the $dataset, so I guess everything should be ok already. I load the datagrid via Load-DataGridView -DataGridView $datagridview1 -Item $($dataset | sort Date -Descending) However, when I click a row, it d...
by stevens
Wed Feb 19, 2020 2:59 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 7
Views: 965

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

If I comment out #if ($datagridview1.DataSource -is [System.Data.DataTable]) -in the click action on the columsn- and click on the column
then the error is
Exception calling "Sort" with "2" argument(s): "DataGridView control must be bound to an IBindingList object to be sorted.".Exception.Message
by stevens
Wed Feb 19, 2020 2:56 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 7
Views: 965

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

Tried to add action, like in article (see below) but that doesn' work .... $datagridview1_ColumnHeaderMouseClick=[System.Windows.Forms.DataGridViewCellMouseEventHandler]{ #Event Argument: $_ = [System.Windows.Forms.DataGridViewCellMouseEventArgs] if ($datagridview1.DataSource -is [System.Data.DataTa...
by stevens
Wed Feb 19, 2020 2:51 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 7
Views: 965

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

Thanks for quick reply.
Because I can't click on column, then have it sorted. See https://lazywinadmin.com/2015/01/powers ... dview.html
Assumed that the convert would make this happen (like it did in other gridviews). So I guess it's another approach then?
by stevens
Wed Feb 19, 2020 1:10 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 7
Views: 965

ConvertDataset for GridView 'Invalid storage type: DBNull.'

Hi, Please see https://www.sapien.com/forums/viewtopic.php?f=21&t=14437 This item is locked, so I ll have to post a new item on the same (note: cannot download the attachment, it says 'does not exist anymore'. Property of the object I try to get in the gridview is TypeName: System.Management.Automat...
by stevens
Tue Feb 04, 2020 10:31 am
Forum: PowerShell GUIs
Topic: Powershell job: you cannot call a method on a null-valued expression..Exception.Message at
Replies: 4
Views: 1103

Re: Powershell job: you cannot call a method on a null-valued expression..Exception.Message at

I have no clue. The line even does not exist.
Is the syntax of my code correct?
by stevens
Tue Feb 04, 2020 6:21 am
Forum: PowerShell GUIs
Topic: Color coding cells in datagridview
Replies: 6
Views: 570

Re: Color coding cells in datagridview

Thanks, works great!
by stevens
Wed Jan 29, 2020 9:44 am
Forum: PowerShell GUIs
Topic: Powershell job: you cannot call a method on a null-valued expression..Exception.Message at
Replies: 4
Views: 1103

Powershell job: you cannot call a method on a null-valued expression..Exception.Message at

Hi, I' m trying to run a script (which takes about 5 minutes) in a powershell job. PS1 works but not in the job. Error I get: You cannot call a method on a null-valued expression..Exception.Message at line 6508 Please advise. Logging-Output "Setting path to script" $CMOverviewScript = "$ScriptDirect...