Xceed Grid for WinForms v4.3 Documentation
Welcome to Xceed Grid for WinForms v4.3 / Migrating / Migrating to version 3.0 / ICellViewer interface to CellViewerManager class
In This Topic
    ICellViewer interface to CellViewerManager class
    In This Topic

    As of version 3.0 of Xceed Grid for WinForms, the ICellViewer interface is obsolete and has been replaced by the CellViewerManager class. This topic provides the information necessary in order to migrate from an older version to the latest version that uses the new viewers.

    Only in the case where a 3.0 license key is used, will the new predefined viewers be used as the default viewers. If a license key prior to version 3.0 is used, Xceed Grid for WinForms will revert back to the old viewers. Note that the old viewers are obsolete.

    In prior versions, the viewers were assigned to either the cell's or the column's CellViewer property. This property is now obsolete and has been replaced by the CellViewerManager property. 

    The following table provides a list of the properties that are now obsolete and their replacements:

    Old member New member
    Cell.CellViewer property Cell.CellViewerManager property
    Column.CellViewer property Column.CellViewerManager property

    Migrating - Predefined viewers

    Prior to version 3.0, predefined viewers were used to view the content of cells and columns according to their datatype. The same is true with version 3.0, however the predefined viewers that are used have been replaced.

    The following table provides a list of the old viewers with their new counterparts.

    Old viewer (obsolete) New viewer
    GridCheckBox CheckBoxViewer
    GridComboBox ComboBoxViewer
    GridImageBox ImageViewer
    GridMaskedTextBox TextViewer
    ControlViewer CellViewerManager

    Only in the case where a 3.0 license key is used, will the new predefined viewers be used as the default viewers. If a license key prior to version 3.0 is used, Xceed Grid for WinForms will revert back to the old viewers. Note that the old viewers are obsolete.

    Migrating - Custom viewers

    Prior to version 3.0, custom viewers were created by either wrapping a control in a ControlViewer or by deriving from the desired control and implementing the ICellViewer interface. As of version 3.0, both the ControlViewer class and the ICellViewer interface are obsolete and have been replaced by the CellViewerManager class.

    Custom CellViewerManagers can be created by deriving from the CellViewerManager class, by handling various events of the CellViewerManager class, or by wrapping a control within an instance of the CellViewerManager class.

    In prior versions, the viewers were assigned to either the cell's or the column's CellViewer property. This property is now obsolete and has been replaced by the CellViewerManager property. 

    The following tables provide a list of the ICellViewer interface members and their corresponding member in the CellViewerManager class.

    ICellViewer interface CellViewerManager class Description
    GetFittedHeight method GetFittedHeight method
    GetFittedHeightCore method
    QueryFittedHeight event
    Retrieves a value representing the fitted height of the viewer, in pixels.
    GetFittedWidth method GetFittedWidth method
    GetFittedWidthCore method
    QueryFittedWidth event
    Retrieves a value representing the fitted widtg of the viewer, in pixels.
    PaintCellValue method PaintCellForeground method
    PaintCellBackground method
    Paint event
    Paints the foreground and background of the cell.

    For a complete list of the public and protected members available in the CellViewerManager class, refer to the Public members and Protected members topics.