?
Solved

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

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

777 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