Cell Template

4 posts, 0 answers
  1. Guga
    Guga avatar
    29 posts
    Member since:
    May 2012

    Posted 07 Nov 2012 Link to this post

    Hi guys,

    Any hints about how to edit the data template of the cells?

    On a side note are you planning on releasing the source code of Q3 2012, including the beta code of the pivot grid?

    Cheers.
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 08 Nov 2012 Link to this post

    Hi,

    Could you please give us with more information about your scenario so that we can determine what's the best solution for you? What do you intend to put in the Cells?

    Most probably the source code will be available with our official release (2013 Q1).

    Looking forward to hearing from you.

    Regards,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Rob
    Rob avatar
    10 posts
    Member since:
    Nov 2012

    Posted 08 Nov 2012 Link to this post

    Hi Rosen,

    I work with Guga, and can elaborate on the question.

    We are interested to know whether it's possible to stack the results shown in the grid based on common rows headers e.g.:

    [Car Model] [Engine Size Ltr]
    -------------------------------------------------
    Corolla | 1.2
    | 1.4
    | 1.6
    -------------------------------------------------

    rather than
    [Car Model] [Engine Size Ltr]
    -------------------------------------------------
    Corolla | 1.2
    Corolla | 1.4
    Corolla | 1.6
    -------------------------------------------------

    We achieved this in the RadGridView by overriding the template for a specific column/cell and passing in an Array as the list of values to be stacked and binding them to a ListBox:

    <telerik:RadGridView x:Name="TestGrid" ItemsSource="{Binding DataSource}">
        <telerik:RadGridView.Columns>
    <telerik:GridViewBoundColumnBase DataMemberBinding="{Binding ResultValue}">
       <telerik:GridViewBoundColumnBase.CellTemplate>
    <DataTemplate>
       <ListBox ItemsSource="{Binding ResultValue}"></ListBox>
    </DataTemplate>
       </telerik:GridViewBoundColumnBase.CellTemplate>

    </telerik:GridViewBoundColumnBase>
        </telerik:RadGridView.Columns>
    </telerik:RadGridView>

    Ideally it would be great if the RadPivotGrid could do this without the need to combine the results into an array as this limits our ability to perform different pivots on the stacked result, as the stacked results are both common and unique depending on which row and column data is used to present the data.
  5. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 09 Nov 2012 Link to this post

    Hello Rob,

    RadPivotGrid is used to perform aggregations and calculations, not to show standalone data. From the data you are showing I cannot see any need of aggregation. Also if you want to show the data in this format:
    [Car Model] | [Engine Size Ltr]
    -------------------------------------------------
    Corolla  | 1.2
                 | 1.4
                 | 1.6
    -------------------------------------------------
    RadPivotGrid will aggregate the values for "Corolla" - it will apply sum of the values and you'll have only one row:
    [Car Model] | [Engine Size Ltr]
    Corolla        | 4.2

    To illustrate this we've prepared a simple example where you'll notice how the data is aggregated.

    Maybe I'm missing something, if there is more data that you want to show or you need to aggregate, then the RadPivotGrid may be helpful, but based on the current information I think you'll need RadGridView.

    Don't hesitate to contact us if you have any other questions or concerns.

    Kind regards,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top