<< Return to Main Index

< Return to Class Index

CGXGridCore::OnSelDragColsMove

virtual BOOL OnSelDragColsMove(ROWCOL nFirstCol, ROWCOL nLastCol, ROWCOL nDestCol);?

nFirstCol

Specifies the first selected column.

nLastCol

Specifies the last selected column.

nDestCol

Specifies the destination column.

Return Value

TRUE if columns can be moved; FALSE if not.

Remarks

Overridable method which is called from OnSelDragMove when the user has moved the mouse to a different column.

When you return FALSE, the grid will display a “no drop”-cursor (see example).

Example

This example shows you how you can inhibit dragging non-frozen column to frozen columns:

// Inhibit dragging columns to nonfrozen columns.
// The grid will display a "no drop"-cursor if OnSelDragColsMove returns FALSE.

BOOL CGridSample3View::OnSelDragColsMove(ROWCOL, ROWCOL, ROWCOL nDestCol)
{
   return nDestCol > GetFrozenCols( );
}

See Also

CGXGridCore::OnSelDragMove CGXGridCore::OnSelDragColsStart

CGXGridCore

Class Overview | Class Members