Hi everyone,
I have set the ItemSource property to an Enumerable Collection (which is changing dynamically by our Entity-Framework).
I have created the columns manually (because I want to show only a subset of the data).
At first, the data is displayed according to the enumerable. When I change something via the DataGrid, it doesn't update the enumerable member. Only when I sort (or move) the columns, the enumerable gets its update.
The same happens in the opposite direction - if the collection changes, it only updates the DataGrid when re-sorting or moving the columns seperator.
I would like to have dynamic-binding, i.e. update the collection whenever our user changes something through the DataGrid, and update the DataGrid whenever our collection changes.
XAML:
<Xceed:DataGridControl x:name="DataGrid1" AutoCreateColumns="False"/>
C#:
(note: enumrable1 = IEnumrable from entity framework, columnsDetails = names of columns that should be used)
DataGrid1.ItemsSource = enumrable1;
foreach (var x in columnsDetails) { DataGrid1.Columns.Add(new Column(x.PropertyName, x.Header, null);}
Thanks!
Assaf