ConsoleGuiTools
ConsoleGuiTools copied to clipboard
-OutPutMode not honored
Name : ConsoleHost Version : 6.2.1
ModuleType Version Name PSEdition ExportedCommands
Script 0.1.1 Microsoft.PowerShell.GraphicalTools Core {Out-GridView, ogv}
Test was trying to select a single row for further processing.
@cadayton I'm a bit confused by this issue, can you go into more detail?
Sure. [-OutputMode {None | Single | Multiple}]
By default OutputMode is 'None' meaning selection of a row isn't possible.
With OutputMode of 'Single' selected, then any single row in the Out-GridView can be selected and the contents of that row are returned. 'Multiple' is similar but multiple rows can be selected rather than limiting the selection to a single row.
When there is a need to present a list of choices to a user, then -Outputmode comes in handy.
Hope this is making more sense. Thanks.
$a = Get-ChildItem c:\users | select name, length | Out-GridView -OutputMode Single Desn't work: no OK(Export) Cancel buttons (PSVersion: 7.0.0-preview.2).
Ah I see!
Yep this is not supported yet but as a workaround you can achieve similar behavior with -PassThru
fyi -passthru is equivalent to -outputmode multiple in this (and legacy) cmdlet and is not the same as the legacy out-gridview's -outputmode single mode.
reopening as this is about GraphicalTools
@andschwa This should be closed as won't fix since it's for the Avalona version.