EhLib.Com
http://forum.ehlib.com/en/

Evolution - dbgrideh background
http://forum.ehlib.com/en/viewtopic.php?f=5&t=982
Page 1 of 1

Author:  ISOAR [ 03 Jul 2019, 14:50 ]
Post subject:  Evolution - dbgrideh background

Hi,

I spotted a change in version 9.3.
The property OddRowColor or function GetCellParams with this code doesn't work.

Code:
if DBEchan.SumList.RecNo mod 2 = 1 then
      Background := $00CEF4FF
  else
      Background := clWindow;
  if MemTableEhEchantillonETAT_ECH.AsString='EF' then
    AFont.Color:=clGreen
  else if MemTableEhEchantillonETAT_ECH.AsString='EE' then
    AFont.Color:=clRed
  else if MemTableEhEchantillonETAT_ECH.AsString='EC' then
    AFont.Color:=clBlue ;


In version 9.0 :
Image

In version 9.3 :
Image


Thank you,

Author:  EhLibSupport [ 04 Jul 2019, 12:57 ]
Post subject:  Re: Evolution - dbgrideh background

Hello ISOAR

We can't reproduce the problem on the simple Demo project.

Can you create Demo project the reproduce the problem?

Code:
procedure TForm1.DBGridEh1GetCellParams(Sender: TObject; Column: TColumnEh;
  AFont: TFont; var Background: TColor; State: TGridDrawState);
begin
  if DBGridEh1.SumList.RecNo mod 2 = 1 then
      Background := $00CEF4FF
  else
      Background := clWindow;

  if MemTableEh1Continent.AsString = 'North America' then
    AFont.Color := clGreen;
end;


Attachments:
sshot-43.png
sshot-43.png [ 31.86 KiB | Viewed 397 times ]
Prj.zip [2.75 KiB]
Downloaded 19 times

Author:  ISOAR [ 11 Jul 2019, 15:35 ]
Post subject:  Re: Evolution - dbgrideh background

Hi,

I found !
It doesn't work when...

Code:
SumList.VirtualRecords = True



Thanks,

ISOAR

Author:  ISOAR [ 19 Jul 2019, 11:00 ]
Post subject:  Re: Evolution - dbgrideh background

Hi,

Did you see the problem on your side?
Edit : We need to use TDbGridEh with TDataSource + TMemTableEh + TDataSetDriverEh + TADOQuery to show the problem.

Thank you,

ISOAR

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/