private void mGrid_MouseMove(object sender, MouseEventArgs e) { if ((e.Button & System.Windows.Forms.MouseButtons.Left) != 0 && !dragDropRectangle.IsEmpty && !dragDropRectangle.Contains(e.X, e.Y)) { var pos = mGrid.RowPositionFromPoint(dragDropStartPoint.X, dragDropStartPoint.Y); var row = mGrid.GetRow(pos); DraggingRow(this, new GridEXRowDragEventArgs(row)); } }
/// <summary> /// /// </summary> /// <param name="grid"></param> /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> public static GridEXRow GetRow(this GridEX grid, int x, int y) { GridArea area = grid.HitTest(x, y); if (area != GridArea.Cell) { return(null); } int position = grid.RowPositionFromPoint(x, y); return(grid.GetRow(position)); }