Joined: 24 Sep 2013, 12:18 Posts: 21
|
Hi,
I am using a dbgrideh named dbgeh that shows the records of a AnyDAC TADQuery.
The DBGridEh has 2 columns: Code : Integer Name: String
DBGEh.ColumnDefValues.Title.TitleButton = True
I have the EhLibAnyDAC.pas unit in uses clause of the interface section of the form's unit.
The following code is executed in the form's OnShow Event. var i : Integer; begin for i := 0 to dbgeh.Columns.Count - 1 do dbgeh.Columns[i].Title.SortMarker := smNoneEh;
dbgeh.DefaultApplySorting;
dbgeh.SortLocal := True; end;
Problem: The Code values are from 1 to 100. The Title Sort Marker does not correspond to the order of the records. When the first record showned in the dbgeh has the Code value of 1 the title sort marker is smUpEh instead of smDownEh. When the first record showned in the dbgeh has the Code value of 100 the title sort marker is smDownEh instead of smUpEh.
How can I fix this?
|
|