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
80
XAMdatapresenter layout
posted

Hello

I'm trying to layout a datagrid to display option values.  Each column is a specific contract month, and each row is a strike. There are two different values (cv and pv) and other variables (left off this example) for each strike.  It should look kind of like this:

    JUN                SEP          DEC

cv 100 pv    cv 100 pv  cv 100 pv

cv 200 pv    cv 200 pv  cv 200 pv

cv 300 pv     cv 300 pv  cv 300 pv

I created (or tried to create) an observable collection of observable collections.  My grid has 15 columns, so it creates 15 "expirMo"s each of which is an observable collection of "values" which contains the strike, cv, and pv.  Each month has the same 500 strikes with different cv and pv values.

My problem is that I cannot get the data to layout correctly.  I get 15 columns, that when I expand them shows the strike,cv,pv (500 times) in a horizontal table. I can only expand one at a time.

If you can point me to or create an example of how create the layout described above, it would be very helpful.  I'm not sure that my logic of creating a collection of collections is correct, I'm open for anything that will allow me to display the data in a manner similar to above.

Thanks

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Parents
No Data
Reply
  • 4475
    posted

    Hello,

     

    I have been looking into your issue and in order to have your goal achieved you can create an observable collection of objects that have property which returns an observable collection. If you have a class called “A” and it has properties “b” and “c”, the first one can be a collection and the other can be for example a string. What will happen if you let the grid to auto generate its layout is that the “b ” collection will be rendered in a new layout and the “c” property will be displayed in its parent row, that you can expand via the “+”  expansion indicator on your left.

     

    I have created a small sample project in order to demonstrate the described approach.

     

    Please let me know if my sample meets your requirements or I have misunderstood you at some point.

     

    Sincerely,

    Ekaterina

    Developer Support Engineer

    Infragistics, Inc.

    www.infragistics.com/support

     

    xamDataGrid_layout.zip
Children