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

Nasty bug in grid agregates sorting?

2 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan
Top achievements
Rank 1
Jan asked on 26 Mar 2013, 02:19 PM
Hi Kendo team,

just want to tell you, that I have found quite an interesting bug. Steps to reproduce:
1) Head over to your web demos at: demos.kendoui.com/web/grid/aggregates.html
2) Sort by 'Unit price'.
3) As you can see (e.g. page 1, 4, ...), all "more than two digit" prices are sorted wrong - it seems only first two digits are taken into account.

Or is this intentional? Attaching screenshot as a proof.

Have a nice day.

2 Answers, 1 is accepted

Sort by
0
Jan
Top achievements
Rank 1
answered on 26 Mar 2013, 02:22 PM
0
Accepted
Petur Subev
Telerik team
answered on 28 Mar 2013, 09:11 AM
Hello Jan,

Thank you for pointing us about this behavior.

This is actually happening because there is no schema specified and the Grid is sorting the column as string (since it is retrieved from the server as string ). I updated the demo with the following code and the changes will be applied on the next live upload.

schema:{
    model: {
        fields: {
            UnitsInStock: { type: "number" },
            ProductName: { type: "string" },
            UnitPrice: { type: "number" },
            UnitsOnOrder: { type: "number" },
            UnitsInStock: { type: "number" }
        }
    }
},


Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Jan
Top achievements
Rank 1
Answers by
Jan
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or