Group by formatted value and not underlying value

3 posts, 1 answers
  1. Boots
    Boots avatar
    81 posts
    Member since:
    Dec 2008

    Posted 24 Oct 2011 Link to this post

    Hello,

    I'm wondering if it's possible to group a column by the formatted value and not the underlying value?

    for example:
    value 1 = 1.12345678
    value 2 = 1.12
    value 3 = 1.1225

    Each of these values with the currency format applied to them (assuming your region setting for currency is "$123,456,789.00") would display the same in the gridview. However when grouping them they would each be in their own group.

    Currently I'm using the Math.Round() method to get around, but i was wondering if there was anything out of the box with the RadGridView to handle this?

    Thanks Much,
    ~Boots
  2. Answer
    Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 27 Oct 2011 Link to this post

    Hi Boots,

    Yes it is .  Using a generic group descriptor you can make almost any kind of  custom grouping .
    I am attaching a small runnable demo. To see this in action , just group by the Price column .

    Regards,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Boots
    Boots avatar
    81 posts
    Member since:
    Dec 2008

    Posted 27 Oct 2011 Link to this post

    Hi Pavel,

    Thank You! That's exactly what I'm looking for!

    Thanks Again,
    ~Boots
Back to Top