Autor Beitrag
landwehr
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Fr 30.03.12 10:59 
Hallo,

ich will mit Delphi 2007 oder XE2 in einem DevExpress TcxGrid die Schriftfarbe in einer anderen Farbe, wenn der Wert in Spalte Belegart = 'GU' ist.

Hat jemand einen Tipp wie das geht.

mfg
Walter
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Fr 30.03.12 11:56 
ein Fetzen aus einem meiner Programme
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TWarenInOut.cxGridDBTableView1StylesGetContentStyle(Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
  out AStyle: TcxStyle);
begin
  inherited;
  if ARecord.Values[Sender.IndexOfItem(Sender.FindItemByName('IO'))] = 'I' then
    AStyle := Mainform.WareIOIn
  else
    AStyle := Mainform.WareIOOut;
end;

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Fr 30.03.12 12:22 
Hallo,

hier mal mein Code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TOffenePostenFrm.OffenePostenVerwaltungViewStylesGetContentStyle
  (Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem;
  out AStyle: TcxStyle);
begin
  if ARecord.Values[Sender.IndexOfItem(Sender.FindItemByName('BELEGART'))] = 'GU' then
    AStyle := Gutschrift;
end;

Ich habe das Gefühl diese Procdure wird gar nicht aufgerufen. Muss ich die expliziet nochmals aufrufen und wenn ja mit welchen Parametern.

Walter

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
vagtler
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 96
Erhaltene Danke: 24


Delphi 2010, C# (VS 2012), Objective-C, Java
BeitragVerfasst: Fr 30.03.12 12:51 
Dein Gefühl könnte der Debugger durch Gewissheit ersetzen.
landwehr Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46

WIN XP, WIN 7, WIN 8
Delphi 6, Delphi 2007, Delphi XE2
BeitragVerfasst: Fr 30.03.12 13:58 
Haltepunkt habe ich gesetzt, aber ohne Wirkung.

Moderiert von user profile iconNarses: Beiträge zusammengefasst

Habe es gelöst. Danke an alle.