Xceed Grid for WinForms v4.3 Documentation
Custom CellViewManagers and reports
Welcome to Xceed Grid for WinForms v4.3 > Advanced Concepts > Custom CellViewManagers and reports

The CellViewerManager class lets you use any control as a viewer to display the content of a cell and allows custom painting of a cell's background and foreground. By using CellViewerManagerReportStyle, you can better control the CellViewerManager report rendering.

Custom CellViewerManagers

When generating a report using the reporting capabilities of Xceed Grid for WinForms, CellViewerManagers will only be reproduced in the report if the GetImageCore and GetTextCore methods return the image or text that is to be displayed. If these methods do not return the necessary information, the string representation of the underlying cell's content will be displayed in the report. 

If you want to display something in the grid that is different from what is displayed in a report, you can override the PaintCellBackground or PaintCellForeground methods without calling the base implementation and use the code for the grid in these methods. The code for reporting would go in the GetImageCore or GetTextCore methods. 

For more details, see Deriving from the CellViewerManager class.