This is a migrated thread and some comments may be shown as answers.

Cell Template

3 Answers 71 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Guga
Top achievements
Rank 1
Guga asked on 08 Nov 2012, 05:42 AM
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.

3 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 08 Nov 2012, 02:32 PM
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.

0
Rob
Top achievements
Rank 1
answered on 08 Nov 2012, 10:23 PM
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.
0
Rosen Vladimirov
Telerik team
answered on 09 Nov 2012, 09:41 AM
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.

Tags
PivotGrid
Asked by
Guga
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Rob
Top achievements
Rank 1
Share this question
or