Murilo,
Vê se isso te ajuda.
João
procedure TfrmOrcamento.gridOrcamentoDBTableView1CustomDrawCell(
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
var
val, val1:string;
begin
if (not AViewInfo.RecordViewInfo.Selected) then
begin
val :=
VarAsType(AViewInfo.GridRecord.DisplayTexts[gridOrcamentoDBTableView1POSICAO.Index],
varString);
val1 :=
VarAsType(AViewInfo.GridRecord.DisplayTexts[gridOrcamentoDBTableView1TIPO.Index],
varString);
if (StrToInt(val)<>0) then
begin
if (val1='V') and (AViewInfo.Item.Index=0) then
begin
ACanvas.Canvas.Font.Color := clGreen;
end;
if (val1='I') and (AViewInfo.Item.Index=0) then
begin
ACanvas.Canvas.Font.Color := clBlue;
end;
end
else
begin
ACanvas.Canvas.Font.Style := [fsBold];
ACanvas.Canvas.Font.Color := clNavy;
end;
end
else
begin
ACanvas.Canvas.Font.Style := [fsBold];
ACanvas.Canvas.Font.Color := clWhite
end;
end;
Em 06/07/2010 15:15, Murilo Cunha escreveu:
> Moacir,
>
> De-me mais detalhes (exemplos).
> Nao estou conseguindo fazer este grid zebrado (de acordo com valores das
> celulas, nao linhas impares ou pares).
>
> Obrigado
> MuriloCunha
>
>
>
> On 06/07/2010 10:33, Prisma - GMAIL wrote:
>
>> Elaine,
>>
>> Use o Style da view do proprio grid para isto..
>>
>> ContentOdd ou ContentEven
>>
>> Sucesso !!
>>
>> Moacir
>>
>>
>> Em 06/07/2010 10:23, Murilo Cunha escreveu:
>>
>>
>>> Elaine,
>>>
>>> Ainda nao deu certo!!
>>> Será que estah faltando alguma coisa?
>>> Poderia me enviar um exemplo?
>>>
>>> Obrigado
>>> MuriloCunha
>>>
>>>
>>>
>>>
>>>
>>
>> ------------------------------------
>>
>>
>>
>
>
> ------------------------------------
>
>