ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.8 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / SetCellImage Method / SetCellImage(Int32,String,Image) Method
Row index.
Column name.
An System.Drawing.Image object containing an image to display in the cell.

In This Topic
    SetCellImage(Int32,String,Image) Method
    In This Topic
    Sets the image displayed in a grid cell.
    Syntax
    'Declaration
     
    Public Overloads Sub SetCellImage( _
       ByVal row As Integer, _
       ByVal colName As String, _
       ByVal newImage As Image _
    ) 
    public void SetCellImage( 
       int row,
       string colName,
       Image newImage
    )

    Parameters

    row
    Row index.
    colName
    Column name.
    newImage
    An System.Drawing.Image object containing an image to display in the cell.
    Remarks

    In addition to the usual cell contents, you can display images in cells. There are two methods for showing images in cells:

    1. You can use the C1.Win.C1FlexGrid.C1FlexGridBase.SetCellImage and C1.Win.C1FlexGrid.C1FlexGridBase.GetCellImage methods to assign images directly to the cells. In this case, the cell contents and the image are independent. To update the image, you need to call C1.Win.C1FlexGrid.C1FlexGridBase.SetCellImage again.

    2. You can use the C1.Win.C1FlexGrid.RowCol.ImageMap property to associate images with specific cell values. In this case, images are updated automatically whenever the cell contents change. The C1.Win.C1FlexGrid.RowCol.ImageAndText property allows you to specify whether the control should display the images in addition to or instead of the cell text.

    See Also