?
Solved

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

Posted on 2004-04-25
5
Medium Priority
?
194 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 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

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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

649 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