Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 27 Apr 2024, 14:03

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 28 May 2014, 07:44 
Offline

Joined: 21 Nov 2012, 01:56
Posts: 119
Admin,
As mentioned in the title, how could I do that by coding?
Thanks.

Best Regards
Nick


Top
 Profile  
 
PostPosted: 05 Jun 2014, 20:26 
Offline
Администратор

Joined: 22 Dec 2011, 20:19
Posts: 335
Hello
Checkboxes in indicator column is a reflaction of TDBGridEh.SelectedRows property.

Here is an example of using SelectedRows

Code:
procedure TForm1.Button1Click(Sender: TObject);
var
  s: String;
  i: Integer;
begin
  DBGridEh1.DataSource.DataSet.DisableControls;
  s := '';
  for i := 0 to DBGridEh1.SelectedRows.Count-1 do
  begin
    DBGridEh1.DataSource.DataSet.Bookmark := DBGridEh1.SelectedRows[I];
    s := s + IntToStr(DBGridEh1.DataSource.DataSet.RecNo) + ',';
  end;
  DBGridEh1.DataSource.DataSet.EnableControls;

  ShowMessage('Selected Records are: ' + s );
end;


Best regards
Admin

_________________
Best regards
Admin


Top
 Profile  
 
PostPosted: 06 Jun 2014, 09:03 
Offline

Joined: 21 Nov 2012, 01:56
Posts: 119
Really appreciate it on help of my undergoing project.
Forgive my another question, how to check or uncheck the checkboxes in indicator column?
I clicked on the checkbox, nothing happen.


Attachments:
1.jpg
1.jpg [ 12.54 KiB | Viewed 2817 times ]
Top
 Profile  
 
PostPosted: 06 Jun 2014, 09:10 
Offline

Joined: 21 Nov 2012, 01:56
Posts: 119
Teacher Admin,
Plz ignore my last question.
It works after I set the dgMultiSelect to be true.

Thanks.


Top
 Profile  
 
PostPosted: 06 Jun 2014, 09:25 
Offline

Joined: 09 Feb 2012, 17:05
Posts: 124
geohuazai wrote:
Really appreciate it on help of my undergoing project.
Forgive my another question, how to check or uncheck the checkboxes in indicator column?
I clicked on the checkbox, nothing happen.


viewtopic.php?f=5&t=471#p991
I gave you the answer since 10 days :lol:


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 69 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