How to sort a TrueDB grid's (VB) checkbox column by clicking the column header?

Hi,

How to sort a TrueDB grid's checkbox column by clicking the column header?

Jafar
jaabaaAsked:
Who is Participating?
 
appariConnect With a Mentor Commented:


try something like this, Make sure you are using XArrayDB object not the XArray object. XArray object has no QuickSort Method.

dim iDataType  as integer
dim iTypeOrder  as integer

Private Sub tdgList_HeadClick(ByVal ColIndex As Integer)
On Error GoTo Err_Section

    If ColIndex = 4 Then
       
        iDataType = XTYPE_BOOLEAN
       
        If iTypeOrder = XORDER_ASCEND Then
            iTypeOrder = XORDER_DESCEND
        Else
            iTypeOrder = XORDER_ASCEND
        End If
       
        moList.QuickSort 0, moList.Count(1) - 1, ColIndex, iTypeOrder, iDataType
       
        Me.tdgList.ReBind
        Me.tdgList.ReFresh

       
    End If
Exit_Section:
    Exit Sub

Err_Section:
    MsgBox ("tdgList_HeadClick" & Err.Description)
    Resume Exit_Section

End Sub
0
 
appariCommented:

whats the datamode you are using?
what version of TrueDBGrid are you using?
0
 
jaabaaAuthor Commented:
Im using TrueDB grid version 6.0
I set the Datamode = Storage

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.