PDA

Click to See Complete Forum and Search --> : need help with DataGrid sorting, like MS Outlook


DeceiverTRX
Oct 2nd, 2000, 04:09 AM
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.

Johannes Schade
Mar 13th, 2001, 12:25 AM
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