Forums
Forums are Read-Only. Use the new Support Center. To start a general discussion, use the General category when submitting your question.

old unsolved problem (Date column sort)

Last post 12/21/2011 10:53 AM by JASON WYMORE. 6 replies.
Sort Posts: Previous Next
  • Cristian Robert Gallas

    old unsolved problem (Date column sort)

    3/5/2003 10:25 PM
        How to make Grid sort correctly a date format string, like my field is
    01/01/2003, how make grid correct sort this field, any way to make a date
    sort?
    
        Thanx all
  • Ed Dressel [DX Squad]

    Re: old unsolved problem (Date column sort)

    3/6/2003 1:45 AM
    If the field is a string field, then there is no way of doing this without
    creating a calculated field and displaying that instead of the string field.
    It would be best to make the string field into a date field.
    
    --
    Ed Dressel
    DX Squad
    
    Developer Express newsgroups are for peer-to-peer support.
    For direct support from Developer Express, write to support@devexpress.com
    Bug reports should be directed to: support@devexpress.com
    Please state if you are not using the latest version of the product.
    "Cristian Robert Gallas" <cristian@ivirtua.com.br> wrote in message
    news:3e668cec@winnt420...
    >
    >     How to make Grid sort correctly a date format string, like my field is
    > 01/01/2003, how make grid correct sort this field, any way to make a date
    > sort?
    >
    >     Thanx all
    >
    >
  • Bastian Bauwens - DX-Squad

    Re: old unsolved problem (Date column sort)

    3/6/2003 3:05 PM
    >     How to make Grid sort correctly a date format string, like my field is
    > 01/01/2003, how make grid correct sort this field, any way to make a date
    > sort?
    
    In addition to what Ed already said: I never had any problems when using a
    date field, the grid always sorts the data correctly. So if you're also
    using a date field, then you should try to reproduce the problem in a sample
    and send it to support.
    
    
    --
    Bastian Bauwens - DX-Squad | http://www.aixware.de
    No e-mail responses, please, unless explicitly requested!
    
    These newsgroups are for peer-to-peer support. For direct support
    or bug reports, please write to support@devexpress.com.
    
    Due to newsgroup guidelines, DX-Squad will not answer anonymous postings.
    
    *** Due to exams at university, I will not be able
    *** to check the newsgroups very frequently at the moment.
  • Dariusz Szwedko

    Re: old unsolved problem (Date column sort)

    1/7/2008 10:20 AM
    • Not Ranked
    • Joined on 1/7/2008
    • Posts 1

    I also have a problem with proper date formating. I need to use dates in column or row area but it seems that they are sorted as strings. I'm using OLAP data source with server time dimension for date fields. I have a division into years-quarters-months-days. No matter if I sort by Key or Value it doesn't work.

    I was trying to use examples from the DemoCenter but in my case it doesn't work as in the examples. I also tried OnCustomFieldSort but the sorting function is never called.

    Are there any special needs for server time dimension to work properly?

  • Martin Kurek

    Re: old unsolved problem (Date column sort) - Now SOLVED!!!

    8/20/2010 2:17 AM
    • Not Ranked
    • Joined on 8/20/2010
    • Posts 1

    Hi all,

    Sorting by date in ASPxGridView didn't work correctly for me.
    I have DateTime property in my business object and i also use date field column in gridview (GridViewDataDateColumn), but sort order is still wrong.
    I find solution:


    <dx:GridViewDataDateColumn FieldName="DateExample">                                 
       <Settings SortMode="Value" />                 
    </dx:GridViewDataDateColumn>


    I must set Settings property SortMode to „Value“.
    Hope is helpfull.

    Kurko

  • Şule YELEN

    Re: old unsolved problem (Date column sort) - Now SOLVED!!!

    8/21/2010 4:43 AM
    • Not Ranked
    • Joined on 8/21/2010
    • Posts 1

     Setting property sortMode to value still does not work

  • JASON WYMORE

    Re: old unsolved problem (Date column sort) - Now SOLVED!!!

    12/21/2011 10:53 AM
    • Not Ranked
    • Joined on 3/30/2011
    • Posts 1

    To allow a column of dates to be sorted as dates not strings, set the Data.ColumnEdit property to a DateEdit type.  The default sorting mechanism will use the data type as specified in the ColumnEdit property for the column to determine how to sort the fields.

     Just because you are setting this property doesn't mean you have to allow users to edit the field, however.  You can still set the OptionsColumn.AllowEdit=False so the user can't edit the dates. 

     Hope this helps someone else who found this thread but didn't benefit from the answers posted so far. 

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.