Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
How do you flatten hierachical data into a single row?
posted

As in:

class Customer

{

  List<Orders> Orders;

  string Name;

 }

class Order

{

  string Product;

  decimal Price;

}

If I want a single row that looks like below, with NO drilling, simply spanning.

Customer | Orders

------------------------------

Jon Doe | Plasma TV | $999.00

             | DVD Player| $399

------------------------------------------

 

I know you can set ColSpan and RowSpan on the Fields, but how do you actually express that a Field contains a collection that shouldn't be "drillable"? If you set IsNestedDataDisplayEnabled="False" then it simply doesn't show any of the collection.

 For example:

<DataPresenter:FieldLayout.Fields>

   <DataPresenter:Field Name="Name" Label="Customer Name"/>

   <DataPresenter:Field Name="???Orders????" Label="Fund Manager"/>

</DataPresenter:FieldLayout.Fields>

 I considered writing code to dynamically generate the FieldLayout and Template, but then I'm still stuck with how to navigate down the object tree.

e.g.

field.Name = string.Format("Orders[{0}].Product", fundIndex);

Any pointers would be greatly appreciated.
Parents
No Data
Reply
  • 80
    posted

     I'd also like to know if this is possible. Such a feature would be very useful.

Children