Re: stupid american system
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 02/18/04
- Next message: Claes Bergefall: "Re: CollectionBase derived class not saving design time items"
- Previous message: .: "Re: How to find reliable offshore (India) programming shop? (this is not a spam)"
- In reply to: Sput: "Re: stupid american system"
- Next in thread: Jon Skeet [C# MVP]: "Re: stupid american system"
- Reply: Jon Skeet [C# MVP]: "Re: stupid american system"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Feb 2004 10:16:13 -0000
Sput <sputspamnomore@post.htnet.hr> wrote:
> Application is rather large and I noticed problem when I started writting
> reports for it.
>
> Data field in database is datetime. When opened in access it can be sorted
> properly in it.
>
> When I get it into C#, I use command as
> sql="SELECT code,name,item1,item2,date WHERE blah blah ORDER by date"
>
> same happens when using GROUP BY date
If you're doing that, it should correctly be sorted to start with,
before you tell the grid to sort the results at all.
> In datagrid, as I have asked several times everywhere, which is populated by
> data from same database, when I click on column that contains dates or decimal
> numbers, it is sorted just by "dd" of "dd.MM.yyyy", while decimal is sorted by "#" of
> "#,##0.00"
It sounds like it's DataGrid's (or possibly even DataView's) sorting
that's at fault then, sorting it by formatted string rather than by
actual value. I'll look into it a bit... it sounds like there's no need
for an actual database to be involved at all.
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Claes Bergefall: "Re: CollectionBase derived class not saving design time items"
- Previous message: .: "Re: How to find reliable offshore (India) programming shop? (this is not a spam)"
- In reply to: Sput: "Re: stupid american system"
- Next in thread: Jon Skeet [C# MVP]: "Re: stupid american system"
- Reply: Jon Skeet [C# MVP]: "Re: stupid american system"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|