I'm quite new to the whole C# .net thing, but I searched a lot and I can't find how to make it work.
I have a DataGrid in my view, like this :
<DataGrid Name="SettingGrid" ItemsSource="{Binding Path=PluginSettings, Mode=OneWay, NotifyOnSourceUpdated=True, UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="True" Margin="224.4,10,10,10"/>
PluginSettings is a DataTable, dynamically filled with different columns and row depending on what the user is doing.
The PluginSettings is always up to date, I have checked that with the debug mode, the columns and row are always how I want them. But the view is never updated.
After some Googling, I found that DataTable is not enumerable, so can not be binded to. I changed my binding to {Binding Path=PluginSettings.DefaultView.
With that, I get the rows working perfectly, but the columns aren't.
When I add a column to my DataTable, the view never shows it. And if I understood correctly what DefaultView is, it means I can't replicate the change the user do on the Grid to the actual DataTable to save them, and that's actually my goal.
Did I miss something ? Is it just a bad choice to use DataGrid, is there something better for what I am trying to do ?
Hoping I made what I mean clear, English is not my first language. Thanks