Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

How do you flatten hierachical data into a single row?

Last post 06-25-2008 5:53 by steven_pack. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-25-2008 5:53

    How do you flatten hierachical data into a single row?

    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.
    • Post Points: 5
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems