ZEE*_*ZEE 3 powershell gridview event-handling
将数据发送到GridView之后(Out-GridView) 
如何创建处理行单击(行选择)的事件
或处理双击并关闭GridView的事件,
以在变量中提供选定的行
TIA
不幸的是,我认为没有的“行选择事件” Out-GridView或双击列表中项目的方法。
但是,此示例显示了如何使用来从数组中选择项目Out-GridView。通过Out-GridViewCmdLet传递数据,并使用-PassThru开关允许用户选择项目。PassThru暗示-Wait将挂起脚本并等待用户选择项目或关闭窗口:
$viewme = @('pick','one','of','these')
$selection = $viewme | Out-GridView -PassThru -Title 'Pick item(s)'
如果单击Cancel或关闭窗口,则$selection变量为null:
$selection -eq $null
True
否则,如果我做的选择项目,他们在返回类型的对象System.Array:
$selection
one
these
| 归档时间: | 
 | 
| 查看次数: | 735 次 | 
| 最近记录: |