<< Return to Main Index

< Return to Class Index

CGXGridCore::OnSelDragColsStart

virtual BOOL OnSelDragColsStart(ROWCOL nFirstCol, ROWCOL nLastCol);?

nFirstCol

Specifies the first selected column.

nLastCol

Specifies the last selected column.

Return Value

TRUE when dragging the specified columns is possible, FALSE if dragging should be aborted.

Remarks

Overridable method which is called from OnSelDragDrop when the user has clicked the mouse on a selected column-header.

You can override this method if you want to avoid dragging specific columns (see example). See CGXGridParam::EnableMoveRows and CGXGridParam::EnableMoveCols if you want to avoid moving rows or columns globally.

Example

This example shows how you can inhibit dragging frozen columns:

// Inhibit dragging frozen columns.

BOOL CGridSample3View::OnSelDragColsStart(ROWCOL nFirstCol, ROWCOL)
{
   return nFirstCol > GetFrozenCols( );

}

See Also

CGXGridCore::OnSelDragStart CGXGridCore::OnSelDragColsMove

CGXGridCore

Class Overview | Class Members