Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
22593 | Dec 16,2004 07:30 AM UTC | Dec 17,2004 09:18 AM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
private int mouseDownRow = -1; private int mouseDownCol = -1; private void gridDataBoundGrid1_MouseDown(object sender, MouseEventArgs e) { Point pt = new Point(e.X, e.Y);; this.gridDataBoundGrid1.PointToRowCol(pt, out mouseDownRow, out mouseDownCol); } private void gridDataBoundGrid1_MouseUp(object sender, MouseEventArgs e) { Point pt = new Point(e.X, e.Y); int row, col; if(this.gridDataBoundGrid1.PointToRowCol(pt, out row, out col) && row == mouseDownRow && col == mouseDownCol) { if(!this.gridDataBoundGrid1[row, col].Enabled) { this.gridDataBoundGrid1.CurrentCell.MoveTo(-1, -1); this.gridDataBoundGrid1.Binder.CurrentPosition = this.gridDataBoundGrid1.Binder.RowIndexToPosition(row); } } mouseDownRow = -1; mouseDownCol = -1; }
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.