Home Dashboard Directory Help
Search

v3 Out-Gridview functionality is crippled if a row of data contains more than 9 lines of text by wtgreen


Status: 

Active


5
0
Sign in
to vote
Type: Bug
ID: 775797
Opened: 1/4/2013 7:03:49 AM
Access Restriction: Public
2
Workaround(s)
view
2
User(s) can reproduce this bug

Description

The v3 Out-GridView is no longer effective if text data contains more than 9 lines of text. If the data in a column is particularly large, the row won't expand vertically past 9 lines of text and the displayed data is truncated, showing ... (ellipses) instead. Copying the row to the clipboard likewise only copies the abbreviated info and the filter criteria only searches the first 9 lines.

We have a script that parses a log file, outputting date/time info, errors and XML data using out-gridview. In v2 if the XML data in a column was large, the row sizes of the gridview would expand vertically to accommodate the long string. We can see the data, copy data we need to investigate further to the clipboard and search the data using the filter criteria. For some of us this ability is so essential to our work that we cannot install v3 because we cannot limit ourselves to only filtering on the first 9 lines of text.

Screenshot showing truncated data and log file: http://social.technet.microsoft.com/Forums/getfile/186894

With v3 installed, running "Powershell.exe -Version 2" does not help since the out-gridview functionality does not work in that instance. See: https://connect.microsoft.com/PowerShell/feedback/details/774972/out-gridview-fails-to-show-in-v2-after-v3-update
Details
Sign in to post a comment.
Sign in to post a workaround.
Posted by wtgreen on 5/9/2013 at 2:28 PM
John_Kopp... thank you! It appears as long as the data has carriage return chars in it, "`r", it will display on separate lines in the gridview, and then when cut-and-pasting that data into another editor, the ones I tried will add the missing linefeeds. That's a truly effective work-around. It shouldn't be necessary, and I could see where it might cause some problems for people depending on their use, but I'm glad to have it as an option.
Posted by John_Kopp on 2/4/2013 at 7:40 AM
Hi,
I found a strange solution.
By running ($_).Message.replace("`n","") on a text data that has more than 9 rows, the Out-GridView started to show more than 9 vertically lines.
Works on powershell v3