Seems my attachment did not go last time.
Think I may be missing something, you are talking about the names of the columns, am I correct that is what I am specifying in the following pictures
For that one the
Column Name = ColUser
Column Header = Username
Column Name = ColPool
Column Header = Pool ID
All Columns
With this, I still get blank white space when using either
Write-Host $row.Cells['ColUser'].Value
Write-Host $row.Cells['Column1'].Value
I also tried changing it to a string to see if maybe it was the formatting of the cell, but no luck just whitespace still
Seems like the Write-Host is trying to do something, but no output.
Thanks
datagridview cell reading
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- FSU-Systems
- Posts: 8
- Last visit: Wed Oct 27, 2021 7:53 am
Re: datagridview cell reading
One update on that, I found in the Properties section of the Columns that it does show the Name there and appears to be what I set to
- FSU-Systems
- Posts: 8
- Last visit: Wed Oct 27, 2021 7:53 am
Re: datagridview cell reading
Think I found a working solution. Instead of looking at the Cell Name with
$row.Cells['ColUser'].Value
I used
$UserN = $row.cells[0].Value
And got the Data from the Cell
Thanks for all the assistance
$row.Cells['ColUser'].Value
I used
$UserN = $row.cells[0].Value
And got the Data from the Cell
Thanks for all the assistance
Re: datagridview cell reading
It works fine for me. Here is an example:
- Attachments
-
- Demo-DGVExport3.psf
- (20.5 KiB) Downloaded 99 times