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
800
use the dataselector.datasource without pivotgrid
posted

Hi,

First of all thanks for all the help that the Infragistics team has provided me so far.

I would need the following functionality without the use of the pivotgrid itself:

Convert the Result of the dataselector.datasource to flat table (anything that represents a flat data table is fine). So if I have dimensions d1, d2, d3 and d4 (no matter if row or column) and I have measures m1 and m2, then I would need a flat table with columns d1, d2, d3, d4, m1and m2 (with the field names of the dimensions/measures as the column names). I also want to exclude all the total rows and columns.

How can I achieve this?

Many thanks and best regards,

Tamas

Parents
No Data
Reply
  • 7922
    Verified Answer
    posted

    Hi,

     

    To show flat data you should use XamGrid and also you should analyze the Result that datasource returns.

    The format of the result is very simple. The result contains ColumnAxis, RowAxis and Cells properties. The ColumnAxis and RowAxis contain collection of tuples in which tuples data for column header and row header are stored.

     

    The count of Rows tuples is equal to first demention of Cells array. What I mean is

    pivotGrid.DataSource.Result.ColumnAxis.Tuples.Count == pivotGrid.DataSource.Result.Cells.GetLength(0)

     

    The same is for columns

    pivotGrid.DataSource.Result.RowAxis.Tuples.Count == pivotGrid.DataSource.Result.Cells.GetLength(1)

     

    The Tuple contains members collection. From this collection you can build the name for your columns. Also The tuple contain IsTotal property to identify if the tuple is summarized.

     

    So you should build your own IEnumerable and pass this data to XamGrid.

     

    Regards

    Todor

Children