It's a pity that this function is not implemented but your solution suits me well.
Thanks very much
Here is my code (VB) according to your advice and it works very well
Private Sub GL_ColHdrClick(sender As Object, e As iGColHdrClickEventArgs) Handles GL.ColHdrClick
e.DoDefault = False
Static Ascending As Boolean
Dim Mg As String, CPT, i As Integer
With GL
Dim MyArray(.Rows.Count - 1) As String
For i = 0 To .Rows.Count - 1
Mg = .CellValues(i, e.ColIndex) : If Ztrim(Mg) <> "" Then MyArray(i) = Mg
Next
Array.Sort(MyArray) : If Ascending = False Then Array.Reverse(MyArray) 'Ascending or descending
Ascending = Not Ascending
For i = 0 To MyArray.Count - 1
If MyArray(i) <> "" Then .CellValues(CPT, e.ColIndex) = MyArray(i) : CPT += 1 ' CPT to Avoid blank lines
Next
End With
End Sub