Heyas,
I’m just adding a treeview and table to display directories and files from an FTP server. The directory tree and file listing is all ok; I just can’t work out how the -OnNodeClicked works. I want to get the ‘Name’ of the node that has been clicked so I can refresh the list of files shown in the table to show the files that are in that particular directory.
New-UDTreeView -Node {
New-UDTreeNode -Id 'Root' -Name $rootDir -Children {
$session:directoryObj | where {$_.Parent -eq $rootDir} | ForEach-Object {
Add-ChildTreeNode $_.Child
}
}
} -OnNodeClicked {
?
}
I’m using v3. The docs show $eventdata is available after the click but I don’t see any data in that variable. Any tips?
Cheers, Steve.