Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 20:41

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 17 Dec 2013, 03:02 
Offline

Joined: 21 Nov 2012, 01:56
Posts: 119
Hi Admin,
Is there a procedure of DBGridEh that acts like clicking on the title of column to make the data sorted.
In my case, MemtableEh is not used.

Thanks.
Nicholas


Top
 Profile  
 
PostPosted: 17 Dec 2013, 07:51 
Offline
Администратор

Joined: 22 Dec 2011, 20:19
Posts: 335
Hello Nicholas

Use the next code:

Code:
procedure TForm1.Button1Click(Sender: TObject);
begin
//1. Set sort marker in Title
// like this
//   DBGridEh1.FieldColumns['CustNo'].Title.SortMarker := smDownEh;
// or like this
  DBGridEh1.FieldColumns['CustNo'].Title.SetNextSortMarkerValue(True);

//2. Apply sorting
  DBGridEh1.DefaultApplySorting;
end;


The grid must be adjusted for soring.

Best regards
Admin

_________________
Best regards
Admin


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 76 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