InsertRow

Top  Previous  Next

Inserts a row for the grid in readonly mode - either the full grid or a sub grid.

[Visual Basic .NET]

Public Function InsertRow(ByVal GridIndex As Integer,

                                      ByVal SectionIndex As Integer,

                                      ByVal RowIndex As Integer,

                                      ByVal Tag As Object,

                                      ByVal UseNextGrid As Boolean,

                                      ByRef CopyGridIndex As Integer,

                                      ByRef CopyRowIndex As Integer) As Boolean

[C#]

public bool InsertRow(int GridIndex,

                               int SectionIndex,

                               int RowIndex,

                               object Tag,

                               bool UseNextGrid,

                               ref int CopyGridIndex,

                               ref int CopyRowIndex);

Parameters

GridIndex

Specifies the working grid index - either the full gird or a sub grid. -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.

Tag

Specifies the Tag property of working row. If this row is a new one, it is null.

UseNextCopyGrid

Specifies whether to use next sub grid to insert a new crow. It becomes irrelevant if the new row is not on the border or the work grid is a sub grid.

CopyGridIndex

Points to a variable holding the index of sync grid, either the full grid or a sub grid, where to insert a sync row. If the working grid is the full grid, the sync grid is a sub grid; otherwise the sync grid is the full grid.

CopyRowIndex

Points to a variable holding the position (0-based) of a sync row in the sync grid indicated by CopyGridIndex.

 

 

Return Value:

If the operation is successful, it returns TRUE; otherwise it returns FALSE. For example, one or more index values are out of bound.

If the row(s) are sorted by clicking one column header, this method returns FALSE.

 

Remarks

The sync row in the associated grid is automatically inserted.