procedure TForm1.cxGrid1DBTableView1CustomDrawIndicatorCell(
Sender: TcxGridTableView; ACanvas: TcxCanvas;
AViewInfo: TcxCustomGridIndicatorItemViewInfo; var ADone: Boolean);
var
i:Integer;
fvalue:string;
fbounds:trect;
begin
FBounds := AViewInfo.Bounds;
if (AViewInfo is TcxGridIndicatorHeaderItemViewInfo) then
begin
ACanvas.Brush.Color := $00C56A31;
ACanvas.FillRect(FBounds);
ACanvas.DrawComplexFrame(FBounds, clBlack, clBlack, cxBordersAll, 1);
ACanvas.Font.Color := clWhite;
ACanvas.Font.Style := [fsBold];
ACanvas.Brush.Style := bsClear;
InflateRect(FBounds, -3, 0);
ACanvas.DrawText('序号', FBounds, cxAlignLeft or cxAlignVCenter);
ADone := True;
end
else if (AViewInfo is TcxGridIndicatorRowItemViewInfo) then
begin
ACanvas.FillRect(FBounds);
ACanvas.DrawComplexFrame(FBounds, clBlack, clBlack, [bBottom, bLeft, bRight], 1
);
i := TcxGridIndicatorRowItemViewInfo(AViewInfo).GridRecord.Index;
fvalue:=IntToStr(i);
InflateRect(FBounds, -3, -2);
ACanvas.Font.Color := clBlack;