[]
        
(Showing Draft Content)

C1.Win.FlexGrid.C1FlexGridBase.CreateImage

CreateImage Method

CreateImage()

Creates an image of the entire grid.

Declaration
public Image CreateImage()
Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

Use this method to copy grid images to the clipboard so you can paste them into documents or other applications.

Examples

The code below creates an image of a grid range and saves it to a PNG file that can be included in other documents such as web pages:

Image img = flex.CreateImage(0,0,10,5);
img.Save(@"c:\temp\grid.png", System.Drawing.Imaging.ImageFormat.Png);

CreateImage(int, int, int, int)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(int topRow, int leftCol, int bottomRow, int rightCol)
Parameters
Type Name Description
int topRow

Top row in the range.

int leftCol

Left column in the range.

int bottomRow

Bottom row in the range.

int rightCol

Right column in the range.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.

CreateImage(CellRange)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(CellRange rg)
Parameters
Type Name Description
CellRange rg

CellRange that specifies which cells should be included in the image.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.

CreateImage(int, int, int, int, EmfType)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(int topRow, int leftCol, int bottomRow, int rightCol, EmfType emfType)
Parameters
Type Name Description
int topRow

Top row in the range.

int leftCol

Left column in the range.

int bottomRow

Bottom row in the range.

int rightCol

Right column in the range.

EmfType emfType

EmfType value that determines the type of metafile to create.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.

CreateImage(CellRange, EmfType, DrawColorMode)

Creates an image of a portion of the grid.

Declaration
public Image CreateImage(CellRange rg, EmfType emfType, DrawColorMode colorMode = DrawColorMode.Color)
Parameters
Type Name Description
CellRange rg

CellRange that specifies which cells should be included in the image.

EmfType emfType

EmfType value that determines the type of metafile to create.

DrawColorMode colorMode

result image color mode.

Returns
Type Description
Image

An Image object containing a metafile image of the grid.

Remarks

The image returned includes any fixed and frozen cells in addition to the specified range.