ConfigureCellImage

Top  Previous  Next

Specifies the attributes of an image that is rendered onto an individual cell for the grid in readonly mode - either the full grid or a sub grid.

[Visual Basic .NET]

Public Function ConfigureCellImage(ByVal GridIndex As Integer,

                                                    ByVal SectionIndex As Integer,

                                                    ByVal RowIndex As Integer,

                                                    ByVal ColumnIndex As Integer,

                                                    ByVal ImagePath As String,

                                                    ByVal PaintWidth As Integer,

                                                    ByVal PaintHeight As Integer,

                                                    ByVal Alignment As Integer) As Boolean

[C#]

public bool ConfigureCellImage(int GridIndex,

                                             int SectionIndex,

                                             int RowIndex,

                                             int ColumnIndex,

                                             string ImagePath,

                                             int PaintWidth,

                                             int PaintHeight,

                                             int Alignment);

Parameters

GridIndex

Specifies the grid index - either the full gird or a sub grid in cascade mode. -1 indicates the full grid; for a sub grid, the parameter's value must be between 0 and the return value of GetTotalSubGrids() minus 1.

SectionIndex

Specifies the index (0-based) of the section in which the cell resides. If the AllowSections is set to FALSE, this parameter becomes irrelevant.

RowIndex

Specifies the index (0-based) of the row in which the cell resides.

ColumnIndex

Specifies the index (0-based) of the column in which the cell resides.

ImagePath

Specifies the absolute path of the image that will be rendered onto the cell.

PaintWidth

Specifies the width (in pixels) of the rectangle onto which the image is rendered.

PaintHeight

Specifies the height (in pixels) of the rectangle onto which the image is rendered.

Alignment

Specifies the alignment's type, and all valid values are listed below:

Value

Comment

3

If the multiple lines (up to 4) of texts are specified via ConfigureCellText, all texts are left-aligned and the image is rendered to the right of  them. Otherwise the image is left-aligned.

4

The image is left-aligned and all texts are drawn to the right of it.

5

The image is center-aligned and no text is drawn.

6

If the multiple lines (up to 4) of texts are specified via ConfigureCellText, all texts are right-aligned and the image is rendered to the left of them. Otherwise the image is right-aligned.

7

The image is right-aligned and all texts of cell are drawn to the left of it.

 

 

Return Value:

If the operation is successful, it returns TRUE; otherwise it returns FALSE. For example, the image is not in a valid format.

 

Remarks

If GridIndex is -1, the sync cell in the associated sub grid is automatically configured. Otherwise, the sync cell is the full grid is automatically configured.