Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
23152 | Jan 5,2005 06:39 PM UTC | Jan 5,2005 09:00 PM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
this.gridControl1.Model.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;
If you want to control the context menus of active cell controls, you may need to use the technique discussed in this thread.
http://64.78.18.34/Support/Forums/message.aspx?MessageID=13861 Private Sub SelectionChanging(ByVal sender As Object, ByVal e As GridSelectionChangingEventArgs) If e.Reason = GridSelectionReason.MouseDown And Control.MouseButtons = MouseButtons.Right Then Dim row, col As Integer Dim pt As Point = Me.GridDataBoundGrid1.PointToClient(Control.MousePosition) If Me.GridDataBoundGrid1.PointToRowCol(pt, row, col, -1) Then Dim rangeList As GridRangeInfoList rangeList = Me.GridDataBoundGrid1.Selections.GetSelectedRows(True, False) If rangeList.AnyRangeIntersects(GridRangeInfo.Cell(row, col)) Then e.Cancel = True End If End If End If End Sub
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.