displaying non-numeric values

2 posts, 0 answers
  1. Rob
    Rob avatar
    10 posts
    Member since:
    Nov 2012

    Posted 08 Nov 2012 Link to this post

    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?
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 09 Nov 2012 Link to this post

    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.

    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top