Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 09:43

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: 04 Mar 2015, 14:38 
Offline

Joined: 15 Aug 2013, 15:13
Posts: 9
Column.HideDuplicates=True

procedure TForm3.DBGridEh1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
begin
// if (Rect.Top = Column.Grid.CellRect(DataCol,Column.Grid.Row).Top) then
Begin
Column.Grid.Canvas.Brush.Color :=$00EEDDFF;
Column.Grid.Canvas.Font.Style:=Column.Grid.Canvas.Font.Style+[fsBold];
Column.Grid.Canvas.Font.Color :=$00408000;//$00FF0080;// $00EEDDFF;
Column.Grid.DefaultDrawColumnCell(Rect,DataCol,Column,State);
end;

end;


the wrong in 8925 Row on dbgrideh.pas



procedure TCustomDBGridEh.DefaultDrawColumnCell(const Rect: TRect;
DataCol: Integer; Column: TColumnEh; State: TGridDrawState);
var
Value: string;
ARect, ARect1: TRect;
XFrameOffs, YFrameOffs, KeyIndex: Integer;
RowHeight: Integer;
IsCellFilled: Boolean;
MultiLine: Boolean;
begin
ARect := Rect;
if (dghFooter3D in OptionsEh) then
begin
XFrameOffs := 1;
InflateRect(ARect, -1, -1);
end else XFrameOffs := 2;
YFrameOffs := XFrameOffs;
if Flat then Dec(YFrameOffs);
Value := Column.DisplayText;

IsCellFilled := False;
if GridBackgroundFilled and (Canvas.Brush.Color = FInternalColor) then
IsCellFilled := True;
if DataLink.Active and MemTableSupport
then RowHeight := RowHeights[FIntMemTable.InstantReadCurRowNum + TopDataOffset]
else RowHeight := FStdDefaultRowHeight;
if Column.GetBarType in [ctCommon..ctKeyPickList] then
begin
if Column.HideDuplicates and CheckColumnDuplicateValues(Column, FIntMemTable.InstantReadCurRowNum, Value, True) then
Value := '';

CheckColumnDuplicateValues(Column, FIntMemTable.InstantReadCurRowNum, Value, True) ????

FIntMemTable.InstantReadCurRowNum or DataCol ?
......


Attachments:
DBGrid test.rar [57.08 KiB]
Downloaded 312 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

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