/// <summary> /// The dataGrid1.IndicatorTitle.CellMouseDown event handler /// Suppress CellMouseDown event when mouse down on question mark area to prevent open IndicatorTitle DropDown menu /// </summary> private void dataGrid1_IndicatorTitle_CellMouseDown(object sender, BaseGridCellMouseEventArgs e) { Rectangle custRect = e.CellRect; custRect.Width = 10; if (custRect.Contains(e.GridMouseArgs.Location)) { e.Handled = true; } }
/// <summary> /// The dataGrid1.IndicatorTitle.CellMouseClick event handler /// Show simple Dialog when mouse clicks on the IndicatorTitle cell in the question mark area /// </summary> private void dataGrid1_IndicatorTitle_CellMouseClick(object sender, BaseGridCellMouseEventArgs e) { Rectangle custRect = e.CellRect; custRect.Width = 10; if (custRect.Contains(e.GridMouseArgs.Location)) { MessageBox.Show("dataGrid1_IndicatorTitle_MouseClick. InCellPost: (" + e.InCellX.ToString() + "," + e.InCellY.ToString() + ") " + e.Button.ToString()); e.Handled = true; } }
/// <summary> /// The dataGrid1.IndicatorTitle.CellMouseMove event handler /// Highlight the question mark area when mouse move over this area /// </summary> private void dataGrid1_IndicatorTitle_CellMouseMove(object sender, BaseGridCellMouseEventArgs e) { bool locMouseInCustPart; Rectangle custBackRect = e.CellRect; custBackRect.Width = 10; locMouseInCustPart = custBackRect.Contains(e.InCellX, e.InCellY); if (locMouseInCustPart != mouseInCustPart) { mouseInCustPart = locMouseInCustPart; dataGrid1.InvalidateCell(e.ColIndex, e.RowIndex); } }