There are several possible solutions to this issue. Certain properties are missing, and IList implementations like my collection of related objects is among those. It is an instance of a class called RowTypeDescriptor, which looks deceivingly like the original object, but is in fact an artificial thing that just looks like it has the same properties. Some debugging and fiddling around, and it turns out that the object returned by DataContext isn't the actual object from my source collection at all. It didn't work - the second grid didn't show anything. Protected override void OnInitialized(EventArgs e) ". I create the following grid in my window: Generally, hooking up a WPF grid to an XPCollection is easy. An Order has a Date and a collection of OrderLines (but the OrderLines are irrelevant here). A Customer has a Name and a collection of Orders. As it turned out, I didn't use more than the Customer and Order classes in the grids, but I left the rest in place anyway. In my demo project (see the download at the bottom) I have created a few persistent classes and a routine to create some test data (in SQL Server by default). There are at least two different approaches I'm going to try, and I found a few small issues on the way as well. This time I'm trying to use the DXGrid for WPF with XPO.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |