Solved

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

Posted on 2004-04-25
5
188 Views
Last Modified: 2013-12-25
Hi,

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

Jafar
0
Comment
Question by:jaabaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 39

Expert Comment

by:appari
ID: 10924821

whats the datamode you are using?
what version of TrueDBGrid are you using?
0
 

Author Comment

by:jaabaa
ID: 10925146
Im using TrueDB grid version 6.0
I set the Datamode = Storage

0
 
LVL 39

Accepted Solution

by:
appari earned 50 total points
ID: 10925280


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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question