FlexGrid for WinForms
SetCellImage(Int32,String,Image) Method



Row index.
Column name.
An System.Drawing.Image object containing an image to display in the cell.
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 _
) 
'Usage
 
Dim instance As C1FlexGridBase
Dim row As Integer
Dim colName As String
Dim newImage As Image
 
instance.SetCellImage(row, colName, newImage)
public void SetCellImage( 
   int row,
   string colName,
   Image newImage
)
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 SetCellImage(Int32,String,Image) and GetCellImage(Int32,String) 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 SetCellImage(Int32,String,Image) again.

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

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGridBase Class
C1FlexGridBase Members
Overload List

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback