UDDataGrid Export

Product: PowerShell Universal
Version: 3.6.3

I’m having trouble exporting data from the UDDatagrid, specifically row values that are arrays messing up the exported CSV file. And - from the forum search, it looks like it will only export the current page. So, I decided to look at the OnExport, and have some questions.

1 - It looks like the examples are incorrect. “$EventData will be an array of rows with their values.”, it instead provides the query information “@{filter=; page=0; pageSize=5; sort=}”

2 - It also references using the Out-UDDataGridExport " You should use Out-UDDataGridExport to return the data from -OnExport".

In the onExport, I have a line to read from the DB (No filters, sorting, etc. yet). And I dumped that to a file on the server to make sure it got all the data properly and it did. But, the Out-UDDataGridExport wants a STRING for the DATA parameter.

I can’t figure out how to use that to export the data to a CSV file. I can’t find anything in the forums either. Does anybody have an example of using the OnExport for the datagrid?