Saludos...
En el evento 'Clicked!' coloca esto...
//Ordenar por Columna el DW
String ls_old_sort, ls_column
Char lc_sort
/* Check whether the user clicks on the column header */
IF Right(dwo.Name,2) = '_t' THEN
ls_column = LEFT(dwo.Name, LEN(String(dwo.Name)) - 2)
/* Get old sort, if any. */
ls_old_sort = this.Describe("Datawindow.Table.sort")
/* Check whether previously sorted column and currently clicked
column are same or not. If both are same then check for the sort
order of previously sorted column (A - Asc, D - Des) and change it.
If both are not same then simply sort it by Ascending order. */
IF ls_column = LEFT(ls_old_sort, LEN(ls_old_sort) - 2) THEN
lc_sort = RIGHT(ls_old_sort, 1)
IF lc_sort = 'A' THEN
lc_sort = 'D'
ELSE
lc_sort = 'A'
END IF
this.SetSort(ls_column+" "+lc_sort)
ELSE
this.SetSort(ls_column+" A")
END IF
this.Sort()
END IF