?
Solved

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

Posted on 2004-04-25
5
Medium Priority
?
195 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
  • 2
3 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 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

807 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