Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 29 Mar 2024, 15:04

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 13 Feb 2014, 13:45 
Offline

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?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group