But, after I’d read this article, I tried to do the same thing with Grid for WPF v.2.0… But there is no DataRows property anymore! So I’m really stunned now – I don’t understand how to add rows to dataGrid from code…
P.S. Binding to some source is not suitable for me – data will arrive from dedicated server..
Imported from legacy forums. Posted by Alexander (had 2354 views)
I think you may have the WinForms grid and the WPF grid mixed up…
That said, if you want to use the WPF grid with master/detail, you will need to provide your data through a DataGridCollectionView (DataGridCollectionViewSource in XAML). Detail relations will be automatically detected in the case where your DataTable has DataRelations, or if your data items implement the IEnumerable interface, or if properties in your data source are maked with the PropertyRelation attribute, which indicates that the detail data is exposed by that property.
I suggest you take a look at the Master/Detail examples in the How-to section of the documentation.
Imported from legacy forums. Posted by Jenny [Xceed] (had 234 views)