Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
14661 | Jun 2,2004 05:25 AM UTC | Jun 2,2004 09:13 AM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
int lastCurrentCellRowIndex = -1; int lastCurrentCellColIndex = -1; private void gridDataBoundGrid1_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e) { if(Control.MouseButtons != MouseButtons.Left) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; this.lastCurrentCellRowIndex = cc.MoveToRowIndex; this.lastCurrentCellColIndex = cc.MoveFromColIndex; } } private void gridDataBoundGrid1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; if(lastCurrentCellRowIndex == cc.RowIndex && lastCurrentCellColIndex == cc.ColIndex) this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell; else this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.None; this.lastCurrentCellRowIndex = cc.RowIndex; this.lastCurrentCellColIndex = cc.ColIndex; }
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.