How to exclude hidden rows and columns for scrolling

9 Dec 20191 minute to read

When scrolling the grid, hidden rows and columns are considered as existing rows and columns. This takes a long time to scroll the grid. To avoid this and save time, you can exclude hidden rows and columns for scrolling. You can achieve this by using HScrollPixel and VScrollPixel properties. To exclude hidden columns for scrolling, set HScrollPixel to true. Similarly, to exclude hidden rows for scrolling, set VScrollPixel to true.

private void Form1_Load(object sender, System.EventArgs e)
{
    this.gridControl1.HScrollPixel = true;
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.gridControl1.HScrollPixel = True;
End Sub
private void Form1_Load(object sender, System.EventArgs e)
{
    this.gridControl1.VScrollPixel = true;
}
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.gridControl1.VScrollPixel = True;
End Sub