Welcome to the Xceed Community Sign in | Join | Help
Community Search  

DetailDescription

Sort Posts: Previous Next
  •  08-20-2008, 12:52 PM Post no. 14253

    DetailDescription

    Hi,

    I am using your DataGridControl to display hierarchical information.

    I am _not_ using DataTable as most of the explain do, I am using plain old CLR objects (POCO).

    I have try to use PropertyDetailDescription class and I wanted to point out some of the difficulties I have found.

    In the base class DataGridDetailDescription you define a property called RelationName. As I understand this is the name I can assign to the relation in order to connect the detail description in the DataGridCollectionViewSource to the details I will create in the DataGridControl.

    Now you also define a class called PropertyDetailDescription which sepose to get the details from a property of an object. The problem is that you need a PropertyDescriptor in order to get the value, but it not easy to set a PropertyDescriptor value in XAML, so you used the RelationName during the initialization of the detail description to get the PropertyDescriptor.

    That's bad, because in my cast I have three level hierarcy which both get the next level by accessing the property Items. I don't think I'm really a corner case because I think you will find it happen more offen then not.

    I think you should add another string property (maybe call it PropertyName) and get the PropertyDescriptor using PropertyName with _no_ relation to the RelationName property. That way I could create two different names for each PropertyDetailDescription with the same PropertyName.

     

    Just to end the story, I have derived a class from DataGridDetailDescription and implement my own code which works just fine.

     

    Ido.

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.