CGXGridCore::OnModifyCell

virtual void OnModifyCell (ROWCOL nRow, ROWCOL nCol);?

nRow

Specifies the row id.

nCol

Specifies the column id.

Remarks

Overridable method which is called when the user changes text in the current cell. The method is called by CGXControl::OnModifyCell.

You can either override OnModifyCell for all controls or subclass a specific control and override the control’s OnModifyCell method.

You can use CGXControl::IsKindOf to determine the control’s class and compute the return value depending on the control’s runtime-type information.

If the current cell is associated with a CGXEditControl-derived object, OnModifyCell will be called when the CEdit fires an EN_CHANGE event.

Note

OnModifyCell will only be called from cells that have an active state, e.g. edit control or combobox where the cell content will later be transferred to the grid when the cell is left.

Other cells like CGXCheckBox or CGXRadioButton that immediately change the cell contents in the grid and have no active state do not call OnModifyCell. If you click on the check button in the checkbox, the checkbox will fire an OnClickedButton event and then call SetStyleRange. You might either override StoreStyleRowCol to check whenever cell contents are changing or specific to checkboxes check the OnClickedButton event.

See Also

 CGXGridCore::GetControl  CGXControl::OnModifyCell  CGXControl::IsKindOf  CGXControl::OnClickedButton

CGXGridCore

 Class Overview |  Class Members