Sort on Date Column

Discussion in 'ASP .Net Datagrid Control' started by Alan Z. Scharf, Dec 5, 2004.

  1. 1. I have sorts on Date and Name column heads

    Initial sort is on ORDER BY Date DESC

    Date Name
    ------------------------------
    10/05/2004 Charlie
    09/30/2004 Baker
    10/10/2003 Able

    2. After then sorting on Name column, and then sorting on Date column, sort
    now appears to be literally on date text:, sorting by month and day.
    Apparently on text of date column in grid.

    Date Name
    ------------------------------
    10/10/2003 Able
    10/05/2004 Charlie
    09/30/2004 Baker



    5. Data is initially bound to grid in !IsPostBack with my
    BindDataGrid(string sortColumn) function. Works fine.

    6. Sort EventHandler has one line of code using same BindDataGrid function:
    BindDataGrid(e.SortExpression)


    How can I get it to sort on actual Date DESC? Shouldn't the postback be
    pulling an actual Date sort back from the SQLServer?

    Thanks.

    Alan
     
    Alan Z. Scharf, Dec 5, 2004
    #1
    1. Advertising

  2. Re: Sort on Date Column - NEVER MIND

    I needed to add "DESC" to e.SortExpression

    Thanks.

    Alan
     
    Alan Z. Scharf, Dec 5, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,368
    Michael Borgwardt
    May 30, 2004
  2. mkhmer

    datagrid sort Date column as string

    mkhmer, Jul 3, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    136
    mkhmer
    Jul 3, 2006
  3. Navin
    Replies:
    1
    Views:
    762
    Ken Schaefer
    Sep 9, 2003
  4. Replies:
    4
    Views:
    154
    Ted Zlatanov
    Jul 18, 2008
  5. Rick
    Replies:
    0
    Views:
    171
Loading...

Share This Page