MoveCell

[method icon] MoveCell(iRow, iCol)

Moves the programming cell to the specified cell

iRow Integer Row to move to
iCol Integer Column to move to

Applies to: Grid


>MoveCell

MoveCell

This method is used to move the programming cell to the specified row and column. This method is used prior to a change in the cells properties. For example, the following would be used to place some text into the cell at row 10, column 10:

.GridControl1.MoveCell(10,10)
.GridControl1.Cell.Text$ = "Have a nice day!"

Specifying either a row or column value of zero will operate on an entire column or row respectively. For example, the following would change the background color of row five:

.GridControl1.MoveCell(5,0)
.GridControl1.Cell.BackColor = &.DarkGreen

Note that the Cell() method can also be used to move the programming cell to the required position, for example the following could be used instead of the examples above:

.GridControl1.Cell(10,10).Text$ = "Have a nice day!"
.GridControl1.Cell(5,0).BackColor = &.DarkGreen

The MoveCursor()method can move the currently selected cell.

See also

Grid methods, properties and events.