i'm trying to use a datagrid with an arraylist as datasource. My code looks like:
- $buttonRefresh_Click={
- #TODO: Place custom script here
- $Data = [System.Collections.ArrayList](Get-Content -Path $PSScriptRoot\Preferences.txt | ConvertFrom-StringData)
- $datagrid1.DataSource = $Data
- $formMain.Refresh()
- }
When i push the button i will see the elements of the $Data, but no content. I see cells like IsReadOnly, IsFixedSize, IsSynchronized, Keys, Values, SyncRoot, Count. I want to see the Content of $Data.
The plain textfile contains some lines like "Name1=Value1".
If i use the following line:
- $Data| out-gridview
Can anyone help me to find my mistake?