Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
20201 | Oct 12,2004 12:51 PM UTC | Nov 3,2004 06:48 PM UTC | WinForms | 5 |
![]() |
Tags: GridControl |
private void gridDataBoundGrid2_DragDrop(object sender, DragEventArgs e) { e.Effect = DragDropEffects.Copy; } 2) You can use the DragOver event on the target to disallow a drop. Here is a handler taht will not drop if the mouse is over column 2.private void gridDataBoundGrid2_DragOver(object sender, DragEventArgs e) { Point pt = this.gridDataBoundGrid2.PointToClient(new Point(e.X, e.Y)); int row, col; if(this.gridDataBoundGrid2.PointToRowCol(pt, out row, out col, -1)) { if(col == 2) e.Effect = DragDropEffects.None; } }
>private void gridDataBoundGrid2_DragDrop(object sender, DragEventArgs e) >{ > e.Effect = DragDropEffects.Copy; >} > > >2) You can use the DragOver event on the target to disallow a drop. Here is a handler taht will not drop if the mouse is over column 2. >>private void gridDataBoundGrid2_DragOver(object sender, DragEventArgs e) >{ > Point pt = this.gridDataBoundGrid2.PointToClient(new Point(e.X, e.Y)); > int row, col; > if(this.gridDataBoundGrid2.PointToRowCol(pt, out row, out col, -1)) > { > if(col == 2) > e.Effect = DragDropEffects.None; > } >} >
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.