Hi Francesco,
In the OnDrawCellDisplayText and OnFillRectangleHook overrides, please check for the PrintingMode property and return. This will resolve the problem.
protected override void OnDrawCellDisplayText(GridDrawCellDisplayTextEventArgs e)
{
if(PrintingMode)
return;
if (!UseGDI)
base.OnDrawCellDisplayText (e);
if (!UseGDI || e.Cancel)
return;
e.Cancel = GridGdiPaint.Instance.DrawText(e.Graphics, e.DisplayText, e.TextRectangle, e.Style);
}
protected override void OnFillRectangleHook(GridFillRectangleHookEventArgs e)
{
if(PrintingMode)
return;
if (!UseGDI)
base.OnFillRectangleHook (e);
if (!UseGDI || e.Cancel)
return;
e.Cancel = GridGdiPaint.Instance.FillRectangle(e.Graphics, e.Bounds, e.Brush);
}
Regards,
Rajagopal