BCGControlBar Pro for MFC
virtual BOOL CBCGPGridCtrl::SetCurSel ( CBCGPGridItemID  idItem,
DWORD  dwSelMode = SM_SINGE_SEL_GROUP|SM_SINGLE_ITEM,
BOOL  bRedraw = TRUE 
)
virtual

Selects a row.

Use this method to select a row specified by idItem.

dwSelMode can be one of the following flags:

  • SM_NONE: remove selection.
  • SM_ALL: select all items in the grid control. Store previous active grid item.
  • SM_SINGLE_ROW: inflate the last selected block to the whole row. Store previous active grid item.
  • SM_SINGLE_COLUMN: inflate the last selected block to the whole column. Store previous active grid item.
  • SM_SINGLE_ITEM: select one specified grid item. Make specified item active.
  • SM_SET_ACTIVE_ITEM: do not change selection. Make one of the previously selected items active.
  • SM_FIRST_CLICK: start selection; select one specified grid item. Make specified item active.
  • SM_SECOND_CLICK: finish selection; select range between active grid item and specified one. Store previous active grid item.

The value can be combined with one of the following flags:

  • SM_SINGE_SEL_GROUP: normal selection mode.
  • SM_CONTINUE_SEL_GROUP: modify current selection. Usually this flag is used when a user holds "SHIFT" button
  • SM_ADD_SEL_GROUP: add new selection to existing selection. Usually this flag is used when the user holds "CTRL" button
  • SM_INVERT_SEL: currently not implemented.
Parameters
idItemThe identifier that points to the grid item object to be selected.
dwSelModeThe flags that specifies the selection mode.
bRedrawIf TRUE, the grid control should be redrawn.