CGXGridCore::MoveCurrentCell

virtual BOOL MoveCurrentCell(int direction, UINT nCell = 1 , BOOL bCanSelectRange = TRUE);

direction

  • Direction to move the current cell. Possible directions are:

  • GX_UPmove up

  • GX_LEFTmove left

  • GX_RIGHTmove right

  • GX_DOWNmove down

  • GX_PGDOWNscroll a page down

  • GX_PGUPscroll a page up

  • GX_TOPmove to first row

  • GX_BOTTOMmove to last row

  • GX_MOSTLEFTmove to first column

  • GX_MOSTRIGHTmove to last column

  • GX_TOPLEFTmove to first row and column

GX_BOTTOMRIGHTmove to last row and column

nCell

Number of rows or columns.

bCanSelectRange

Specifies if current cell shall be marked as selected range. If FALSE, current cell will not be marked as selected range. This parameter has no effect if GetParam()-> SetExcelLikeCurrentCell(TRUE) has not been called.

Return Value

TRUE if the operation was successful; FALSE if the current cell could not be moved (e.g. if OnValidateCell returned FALSE)

Remarks

Overridable method which selects a new current cell based on an offset from the existing current cell.

Hidden columns and rows and disabled cells will be skipped (see FindNextCell).

The method computes the new position of the current cell and calls SetCurrentCell with the flag GX_SCROLLINVIEW so that the new cell will be automatically scrolled into the visible area.

See Also

 CGXGridCore::SetCurrentCell  CGXGridCore::FindNextCell  CGXGridParam::SetExcelLikeCurrentCell

CGXGridCore

 Class Overview |  Class Members