Show-UDModal not showing content

I am trying to import a csv and group the content by count which all works fine. Then I would like to be able to click on a new button to view the devices for example:

Instagram | 20 installs | Button [View Devices with app installed]

When I click the button it just loads the header and never loads the data. Here is my code am I doing something wrong?

 New-UDGrid -Title "Apps" -FontColor black -Headers @("Name", "# of Installs","View Devices") -Properties @("Name", "count","ViewDevices") -Endpoint {
 Import-Csv 'C:\Dashboard\AppsInstalled.csv' -Delimiter "," | 
          Group-Object -Property Name | 
         Select-Object Name,Count | 
          ForEach-Object {
              [PSCustomObject]@{
                   Name = $_.Name
                   username = $_.username
                   count = $_.count
                   ViewDevices = New-UDButton -Text "View Devices" -OnClick (New-UDEndpoint -Endpoint { 
                       Show-UDModal -Content {
                          New-UDTable -Title "Users with Application Installed" -Headers @("Name", "Username") -Content {
                             Import-Csv 'C:\Dashboard\AppsInstalled.csv' -Delimiter "," | Where-object {$_.Name =$_.Name} | Out-UDTableData -Property @("Name", "Username")
                          }
                       } 
                   } -ArgumentList[0])
              }
          } | Out-UDGridData
 }

I’m new to UD as well, but if I’m understanding you correctly it seems like you’re just formatting your grid wrong. I’m not sure how your csv is formatted, but you should just be able just utilize a PSCustomObject or hashtable and expand upon your properties from that point.

 New-UDGrid -Title "Apps" -FontColor black -Headers @("Name", "# of Installs","View Devices") -Properties @("Name", "count","ViewDevices") -Endpoint {

            $YourData = Import-csv "C:\Dashboard\AppsInstalled.csv" 

            $YourData | ForEach-Object {
              [PSCustomObject]@{
                Name   = $_.Name
                Username = $_Username
                ViewDevices = New-UDButton -text "View Devices" -OnClick { Script block to your detailed device info }
              }
            
            } | Out-UDGridData

}

I think the above example should help.