|
-
Apr 5th, 2001, 10:36 AM
#1
Thread Starter
New Member
Hi
I have a datagrid bound to a recordset. What I want to be able to do is sort the data when I click on any heading on any of the columns within datagird.
I've tried and tried but no luck
Any help would be great!
Thanks in advance
Manny
-
Apr 5th, 2001, 10:51 AM
#2
Lively Member
Try this code
Private Sub dgUserList_HeadClick(ByVal ColIndex As Integer)
adcUserList.RecordSource = "Select * From tlkpOlarisUsers order by " & _
dgUserList.Columns(ColIndex).DataField
End Sub
-
Apr 6th, 2001, 02:45 AM
#3
New Member
Try to use MSHFlexGrid. Code example:
Set Me.MSHFlexGrid1.DataSource = Me.adcReport
Me.MSHFlexGrid1.Sort = 7
Sort Property
-----------------
flexSortNone 0 None.
flexSortGenericAscending 1
flexSortGenericDescending 2
flexSortNumericAscending 3
flexSortNumericDescending 4 flexSortStringNoCaseAsending 5 flexSortNoCaseDescending 6
flexSortStringAscending 7
flexSortStringDescending 8
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|