Results 1 to 2 of 2

Thread: need help with DataGrid sorting, like MS Outlook

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2000
    Posts
    1

    Question

    I'm having difficulty getting a DataGrid to sort the database entries.

    As the moment, they are sorted by the order of entry into my Access database, but I need to have them sort by clicking in the header, similar to MS Outlook... Also, when a column is set to a "checkbox", I am returned the value of 1 or 0, instead of this checkbox, even though that field is set as a checkbox in Access.

    Any help would be greatly appreciated, even as to an alternate DataGrid OCX file to use.

    Many thanks.

  2. #2
    New Member
    Join Date
    Jun 2000
    Posts
    14

    Datagrid Sort

    Dear Colleague
    I use the "Sort" property of the underlying ADO recordset (rs) on the column selected in the Datagrid (dg), for example:

    If dg.Col > -1 Then
    rs.Sort = rs.Fields(dg.Col).Name & " DESC"
    end if

    That works fine for me.
    Greetings Johannes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width