
February 13th, 2006, 04:19 AM
|
|
Contributing User
|
|
Join Date: Oct 2005
Posts: 93
Time spent in forums: 1 Day 13 h 58 m 8 sec
Reputation Power: 4
|
|
Sort By Column Header in Hierarchical Flexgrid
Hi everyone,
I'm trying to allow user to view sorted data from a Hierarchical Flexgrid in my VB6 program.
To do this, the user should click on a column header in the Hierarchical Flexgrid and all the data in the Hierarchical Flexgrid should be sorted according to the column header selected.
The problem is, the column header is a "fixed column" and the user is not able to sort data via the column header by clicking on it (eventhough I've set the "AllowUserResizing" property to "1 - flexResizeColumns").
What should I do? Please help.
Thanks very much.
Here's the codelines
(Sorts data only when row = 1 and not row = 0, as desired):
Code:
Private Sub MSHFlexGrid1_Click()
With MSHFlexGrid1
Dim myCol
myCol = .ColSel
'This line will not work :
'If .row = 0 Then
If .row = 1 Then
.col = myCol
.Sort = 1
End If
End With
End Sub
|