Search found 6 matches

by carrdav
Thu Nov 29, 2018 10:07 am
Forum: PowerShell GUIs
Topic: Freeze the 1st column in a grid, Posh Studio 2018
Replies: 8
Views: 2201

Re: Freeze the 1st column in a grid, Posh Studio 2018

It worked but I will check your example out too, thanks!
by carrdav
Wed Nov 28, 2018 7:02 pm
Forum: PowerShell GUIs
Topic: Freeze the 1st column in a grid, Posh Studio 2018
Replies: 8
Views: 2201

Re: Freeze the 1st column in a grid, Posh Studio 2018

Got it. I had to reference it as $dataGridViewResults.

Code: Select all

Load-DataGridView -DataGridView $datagridviewclusters -Item $tableClusters

# Putting this AFTER My Load-DataGridView function. 
$dataGridViewResults.Columns["Servername"].Frozen = $true;
by carrdav
Wed Nov 28, 2018 6:34 pm
Forum: PowerShell GUIs
Topic: Freeze the 1st column in a grid, Posh Studio 2018
Replies: 8
Views: 2201

Re: Freeze the 1st column in a grid, Posh Studio 2018

Ahh, I see, awesome thanks! I gave it a go and it gave me a duplicate Servername column but it's frozen! Unfortunately since my code builds the columns on the fly I have to do it programmatically in one of the functions. Something like: $dataGridView1.Columns[0].Frozen = $true; $dataGridView1.Column...
by carrdav
Wed Nov 28, 2018 5:55 pm
Forum: PowerShell GUIs
Topic: Freeze the 1st column in a grid, Posh Studio 2018
Replies: 8
Views: 2201

Re: Freeze the 1st column in a grid, Posh Studio 2018

Where would I do that exactly? I'm doing one of these: $DataCollectorSet | Add-Member -Type NoteProperty -Name "SpecMVVFCBM" -Value $SpecMVVFCBM $DataCollectorSet | Add-Member -Type NoteProperty -Name "OSServername" -Value $CS.Name #bla bla bla $DataList += $DataCollectorSet # Th...
by carrdav
Wed Nov 28, 2018 3:26 pm
Forum: PowerShell GUIs
Topic: Freeze the 1st column in a grid, Posh Studio 2018
Replies: 8
Views: 2201

Freeze the 1st column in a grid, Posh Studio 2018

Is there an easy way to do that? Similar to Excel where you can freeze the first column. I have an app that checks on servers and brings back multiple fields. The first field is SERVERNAME and as I scroll horizontally I'd like the 1st column (SERVERNAME) to stay in view as a reference as I scroll pa...
by carrdav
Wed Apr 11, 2018 6:58 pm
Forum: PowerShell GUIs
Topic: Change back color of cell based on two conditions
Replies: 1
Views: 936

Change back color of cell based on two conditions

Hey guys. I've been using this code in DataGridViewCellFormattingEventHandler to flip a cell color in the datagrid while checking the value of a single cell. How can I change the back color in one cell based on the value in two cells in the same row? The first two if's work, the last nested if does ...