MyDAC, TCRDBGRID, dgeRecordcount and dgeSummary

MyDAC, TCRDBGRID, dgeRecordcount and dgeSummary

Postby calix » Thu 30 Dec 2004 15:55

Hy,

i need in tcrDBGrid both options: dgeRecordcount and dgeSummary at one time.
When enabling dgeRecordcount and dgeSummary, it seems the Recordcount-Field n/xxx overwrites the other Summary-Fields.
Is this a bug or is it a feature. :wink:

May you can add a new Summary-Mode smRecordCount?

Regards
Harald
calix
 
Posts: 5
Joined: Fri 19 Nov 2004 04:54

Postby calix » Thu 30 Dec 2004 16:53

I´ve modified the source in CRGrid like that. May you implement in your next release.

CRGrid.pas Line 2475
:idea:
Code: Select all
if dgeRecordCount in FOptionsEx
then begin
  CellRect := FullRect;
  InflateRect(CellRect, -2, -2);
  //HAK 30.12.2004 This will paint the Field to the whole line
  //CellRect.Right := RightBorder;
  if DataLink.Active then
      tmpText := IntToStr(DataLink.DataSet.RecNo) +
        ' / ' + IntToStr(DataLink.DataSet.RecordCount)
  else
      tmpText := '';//'Records count : INACTIVE';

  //HAK 30.12.2004 This will paint the Field as needed 
  CellRect.Right := Canvas.TextWidth(tmpText);
  WriteText(Canvas, CellRect, 0, 0, tmpText, taLeftJustify,True);
end;


Regards Harald
PS: have a happy new year, and thanks for your good work!!! :D
calix
 
Posts: 5
Joined: Fri 19 Nov 2004 04:54

Postby Alex » Wed 05 Jan 2005 10:01

"TCRDBGrid.OptionsEx" topic in CRDBGRID help says that "dgeSummary is mutually exclusive with dgeRecordCount option." It happens because of paint confrontation in these modes.
Your suggestion doesn't resolve this problem so we decide to reject it.
Alex
 
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Postby Guest » Wed 05 Jan 2005 10:29

But for the most cases, it works very fine and the paint-confrontation, is much lesser.

How do you think about a new summary type smCount?
Guest
 

Postby Alex » Wed 05 Jan 2005 15:08

We couldn't support features that work in some, possible, most cases, but in the rest cases cause problems.
As to your second question - we are planning to add a new functionality to CRDBGrid but not in the nearest time.
Alex
 
Posts: 655
Joined: Mon 08 Nov 2004 08:39


Return to MySQL Data Access Components