Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 24 Apr 2024, 20:52

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 18 Apr 2018, 14:54 
Offline

Joined: 18 Apr 2018, 14:49
Posts: 11
Hello , I'm using TDBGRIDEH with Firedac and Sqlserver on Delphi 10.2.3 Tokyo , well I set Options rioShowrowIndicator and rioShowRecNo to true , but in the grid it displays the same number in the rows and if I change the selections all rows display the same row number . like in the image below.

best regards


Attachments:
Capture.PNG
Capture.PNG [ 61.61 KiB | Viewed 8088 times ]
Top
 Profile  
 
PostPosted: 18 Apr 2018, 20:49 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello

Please, check if DataSet that you use returns correct Record Number.

Add new Column to the Grid and write Column.OnGetCellParams event handler as following

Code:
procedure TForm1.DBGridEh1Columns5GetCellParams(Sender: TObject;
  EditMode: Boolean; Params: TColCellParamsEh);
begin
  Params.Text := IntToStr(DBGridEh1.DataSource.DataSet.RecNo);
end;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 19 Apr 2018, 09:35 
Offline

Joined: 18 Apr 2018, 14:49
Posts: 11
but I think it is not getting the record count not recoNum cause when I navigate through it all the row number in the grid becomes the same as the current row


Top
 Profile  
 
PostPosted: 19 Apr 2018, 15:20 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello

I did not understand what you mean in the previous message.
Can you write more details?

DBGridEh uses DataSource.DataSet.RecNo property to draw RowNum for a current drawing Record.
If DataSet for all records returns the same number, then most likely in the DateSet code there is an error.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 20 Apr 2018, 16:44 
Offline

Joined: 18 Apr 2018, 14:49
Posts: 11
Well , I'm using TFDtable of (FireDac) to connect with a table using an SQLSERVER Database , everything works find the TFDTable returns RecNo and RecordCount Properly , but when I link to a datasource and with DBGridEh I get all row numbers equal to the currently selected where it should show them for intsance in that order
1
2
3

if Row 2 is selected it shows
2
2
2


Top
 Profile  
 
PostPosted: 23 Apr 2018, 10:26 
Offline

Joined: 18 Apr 2018, 14:49
Posts: 11
So any solutions ???


Top
 Profile  
 
PostPosted: 29 Apr 2018, 11:47 
Offline

Joined: 08 May 2014, 18:06
Posts: 663
Hello

Try to set

Code:
   
    DBGridEh1.SumList.Active = True
    DBGridEh1.SumList.VirtualRecords = True

These properties are for DataSets that can't return the correct RecNo.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 27 Apr 2020, 03:54 
Offline

Joined: 27 Apr 2020, 03:52
Posts: 1
Set FDTable.CachedUpdates := True;

or

Set FDTable.UpdateOptions.RequestLive := False;


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

All times are UTC


Who is online

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