Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
5409 | Jul 2,2003 01:03 AM UTC | Jul 3,2003 07:36 AM UTC | WinForms | 3 |
![]() |
Tags: GridControl |
Dim cc As GridCurrentCell = Me.grid.CurrentCell
cc.MoveTo(1, 2, GridSetCurrentCellOptions.SetFocus)
If you are doing this when the grid is hidden (like in Form_Load or from another tab that is active), you should also set:
Me.grid.ForceCurrentCellMoveTo = True
private int mouseDownRow = -1; private int mouseDownCol = -1; private void gridControl1_GridControlMouseDown(object sender, Syncfusion.Windows.Forms.CancelMouseEventArgs e) { this.gridControl1.PointToRowCol(new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y), out mouseDownRow, out mouseDownCol, -1); } private void gridControl1_GridControlMouseUp(object sender, Syncfusion.Windows.Forms.CancelMouseEventArgs e) { int row; int col; if( this.gridControl1.PointToRowCol(new Point(e.MouseEventArgs.X, e.MouseEventArgs.Y), out row, out col, -1) && row == mouseDownRow && col == mouseDownCol) { //change the click from cell 2,2 to 1,1 if(row == 2 && col == 2) { this.gridControl1.CurrentCell.MoveTo(1,1); // and/or maybe //this.gridControl1.ScrollCellInView(1,1); } } 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.