Stop mouse dragging cells off grid (GridDesktop)

I created 4 columns in the grid and open the grid showing those 4 columns. When the user selected a 4th column cell with their mouse and drags the mouse rightwards, the 1st 3 columns are shifted off the grid.

How can we stop this behavior. All 4 columns should always be visible.

Hi,


Well, I tested your case. I pasted two lines of code (into form’s load event) to make a 4 * 4 matrix in the GridDesktop:

gridDesktop1.Worksheets[0].ColumnsCount = 4;
gridDesktop1.Worksheets[0].RowsCount = 4;

Now when I just select the cell by using the mouse e.g D4, and drag it (by mouse) to the right side, it will surely shift you to the right side and some blank area is inserted on the right, so consequently and due to your Grid’s size/area, the first few columns are not visible as the GridDesktop is now scrolled to the right side. To view the first few columns, you have to click on the back scroll button ("<") on the bottom right of the grid. This is normal behavior and not an issue with the GridDesktop.

Thanks for your understanding!