|| | |||Browse by category|
How can I prevent the user from selecting more than one row at a time?
There are several alternatives:
- Turn off the grid selection mechanism (call EnableSelection()). Add a handler for mouse clicks yourself (OnLButtonClickedRowCol()) and then call SelectRange() to select the one row.
- Another solution is to override CanChangeSelection() as follows:
|BOOL CMyGrid::CanChangeSelection(CGXRange* pRange, BOOL bIsDragging, BOOL bKey)
|if (pRange != NULL && pRange->GetHeight() > 1)|
|return CGXGridCore::CanChangeSelection(pRange, bIsDragging, bKey);|
Article ID: 705
Last updated: 11 Jun, 2018
Posted: 23 Jan, 2001 by Meltreger B.
Updated: 11 Jun, 2018 by Meltreger B.
Others in this category
Objective Grid: Can CGXRecordInfoWnd and CGXRecordInfoSplitterWnd be used with other grids besides the browser grids?
Objective Grid: How can I programmatically change the record number that is displayed in the record field of the CGXRecordInfoWnd?