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

displaying non-numeric values

1 Answer 83 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 08 Nov 2012, 10:35 PM
We have data similar to the following:

[TestType] | [TestGroup] | [Prefix] | [Result] | [ResultWithPrefix]
-----------------------------------------------------------------------------------------------------------------
Test123 | TestGroupA | < | 2.0 | < 2.0
-----------------------------------------------------------------------------------------------------------------
TestABC | TestGroupA | NULL | 3.45 | 3.45
-----------------------------------------------------------------------------------------------------------------
Test321 | TestGroupB | < | 0.05 | < 0.05
-----------------------------------------------------------------------------------------------------------------

If we setup up the Pivot Grid to display TestType (row), TestGroup (column), Result (Values) the data displays as expected however we need to display the Prefix data immediately before the result within the Pivot Grid. One way to achieve this is to concatenate the Prefix and Result columns in our database query however it seems that displaying the ResultWithPrefix column within the Pivot Grid results in either the word ERROR or a bunch of 1 and 2s displayed rather than the correct values. We assume that this is because the Pivot Grid is trying to perform numeric calculations on the Values data. Is there an attribute or setting we can specify within the xaml that will allow us to display this data correctly?

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 09 Nov 2012, 01:49 PM
Hello Rob,

RadPivotGrid is designed to aggregate only numeric values. If you take the data as strings (with some letters in them) and set it as AggregateDescription, RadPivotGrid is unable to do its job.

For your case - you can use Number format for your aggregated data, but it will be used for all of the items:
<pivot:PropertyAggregateDescription PropertyName="Price" StringFormat="C" AggregateFunction="Average" />

Based on your description I think you can use RadGridView and receive the needed results. More information about RadGridView features can be found in our online help and in our online demos.

Greetings,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

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