Tools Links Login

datagrid simply sort

a simply sort on de collumsheaders of a datagrid

Original Author: gubo

Inputs

a datarid,and a connection with a d-base

Returns

sort "asc" & "desc"

Code

Private Sub DataGrid1_HeadClick(ByVal ColIndex As Integer)
  With AdoBoeken.Recordset
    If (.Sort = .Fields(ColIndex).[Name] & " Asc") Then
      .Sort = .Fields(ColIndex).[Name] & " Desc"
    Else
      .Sort = .Fields(ColIndex).[Name] & " Asc"
    End If
  End With
End Sub

About this post

Posted: 2003-06-01
By: ArchiveBot
Viewed: 93 times

Categories

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.