Search found 419 matches

by stevens
Fri Oct 16, 2020 1:46 am
Forum: PowerShell GUIs
Topic: Disable tab in tabcontrol based upon value
Replies: 1
Views: 136

Disable tab in tabcontrol based upon value

Hi,

I have the code to remove a tab in a tabcontrol,
That's
$tabcontrol.TabPages.Remove($tab)

but how can I disable a tab (actually multiple only focussing on one) based upon a certain value in a grid.

Just need to code to disable it, then I can work it out :-)
Thanks.
by stevens
Fri Oct 16, 2020 1:23 am
Forum: PowerShell GUIs
Topic: RowPainting example?
Replies: 1
Views: 100

RowPainting example?

Hi, I'd need to paint a row when certain value in a cell. Cellpainting is working fine, but can't find rowpainting example. This is my cellpainting example: if ($datagridview1.Columns[$_.ColumnIndex].Name -eq 'Enabled') { if ($_.Value -eq 'yes') { $_.CellStyle.BackColor = 'lightgreen' } } Tried with...
by stevens
Thu Aug 13, 2020 6:16 am
Forum: PowerShell GUIs
Topic: Connect-AZaccount in GUI
Replies: 1
Views: 237

Connect-AZaccount in GUI

Hi,

Any update on this topic?
viewtopic.php?t=14303

Have the same issue (GUI freezes) and no workaround at all.
Please advise.
by stevens
Tue May 05, 2020 8:21 am
Forum: PowerShell GUIs
Topic: ConvertDataset for GridView 'Invalid storage type: DBNull.'
Replies: 23
Views: 2935

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: 2935

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: 2935

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: 2935

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: 555

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.