Search found 31 matches

by pjbuckley
Wed Dec 11, 2019 8:44 am
Forum: PowerShell GUIs
Topic: Apply color to single cell based on [int] value
Replies: 12
Views: 1037

Re: Apply color to single cell based on [int] value

Uh. I dont know why you are treating me like this. I asked for help on a small problem i have in a project that ive written 2000 lines of code. Rather than taking 15 minutes to actually answer my questions weve spent over 30 hours going back and forth because you want to sit on your high horse. Than...
by pjbuckley
Tue Dec 10, 2019 6:26 pm
Forum: PowerShell GUIs
Topic: Apply color to single cell based on [int] value
Replies: 12
Views: 1037

Re: Apply color to single cell based on [int] value

Thanks. I already reference those articles regularly. they are useful but havent helped me fix my problem. I learn by working examples. I take bits of code that work and apply them to my scripts. Since that is all in C# its mostly gobbledy-gook to me. i dont have a background in development and dont...
by pjbuckley
Tue Dec 10, 2019 6:00 pm
Forum: PowerShell GUIs
Topic: Apply color to single cell based on [int] value
Replies: 12
Views: 1037

Re: Apply color to single cell based on [int] value

Im having trouble finding the $_.value property on a column. I see it on the rows but not columns

Are you saying that i should change my integers into strings when comparing them?
by pjbuckley
Tue Dec 10, 2019 5:43 pm
Forum: PowerShell GUIs
Topic: Apply color to single cell based on [int] value
Replies: 12
Views: 1037

Re: Apply color to single cell based on [int] value

The value in the cell is an integer. The code is supposed to change the color of the cell based upon the value in the cell.

and yes ive tried with and without the quotes around the zero and still no dice.
by pjbuckley
Tue Dec 10, 2019 4:21 pm
Forum: PowerShell GUIs
Topic: Apply color to single cell based on [int] value
Replies: 12
Views: 1037

Apply color to single cell based on [int] value

this code isnt updating the color of the cells: $DGV7_CellPainting = [System.Windows.Forms.DataGridViewCellPaintingEventHandler] { if ($DGV7.rows.cells["notdocumented"].value -ne 0) { $DGV7.rows.cells["notdocumented"].style.backcolor = '#ff0f0f' } } any ideas? ANSWER: I was missing the following cod...
by pjbuckley
Mon Dec 09, 2019 3:56 pm
Forum: PowerShell GUIs
Topic: Check all checkboxes not from column header
Replies: 10
Views: 1085

Re: Check all checkboxes not from column header

OK. Where is the $_.checked property on the cell?

get-member does not return the $_.checked property on the row, column, or cell. Had it been there from my very first post, i wouldn't still be stuck on this.
by pjbuckley
Mon Dec 09, 2019 2:04 pm
Forum: PowerShell GUIs
Topic: Check all checkboxes not from column header
Replies: 10
Views: 1085

Re: Check all checkboxes not from column header

This bit of code:

$DGV1.Rows[$_.RowIndex].Cells | ForEach-Object{ $_.Checked = $true}

Where does the $_.checked property exist when the column header names are unknown and the cells are dynamically generated as boolean?
by pjbuckley
Mon Dec 09, 2019 12:17 pm
Forum: PowerShell GUIs
Topic: HeaderText exception when not referencing HeaderText
Replies: 5
Views: 926

Re: HeaderText exception when not referencing HeaderText

I get errors like these every time i forget to create the "column object" i.e.: $Column0 = New-Object System.Windows.Forms.DataGridViewComboBoxColumn $Column0.Name = "StartTime" $Column0.HeaderText = "StartTime" Omit the first line in that bit of code and i get the same error you do. or If you are u...
by pjbuckley
Mon Dec 09, 2019 9:37 am
Forum: PowerShell GUIs
Topic: Check all checkboxes not from column header
Replies: 10
Views: 1085

Re: Check all checkboxes not from column header

I keep seeing online how there is a property in a checkboxcell named : Checked or isChecked.

Where do i access this property. Is it on the row, column or attached to the data somehow?

Even knowing this im not sure it would get me the answer i need.
by pjbuckley
Mon Dec 09, 2019 9:26 am
Forum: PowerShell GUIs
Topic: Check all checkboxes not from column header
Replies: 10
Views: 1085

Re: Check all checkboxes not from column header

That's odd. Removing one "for" loop out of that code will check all the boxes in the column. I dont really know how to build a context menu around this.