Category / Section
How to get the top or bottom and left or right viewable row and column indexes in WinForms GridControl?
Row and column index
To get the Top/Left/Bottom/Right viewable Row and Column index of the grid, use the following code.
// Top Row Index.
this.gridControl1.TopRowIndex.ToString();
// Left Column Index.
this.gridControl1.LeftColIndex.ToString();
//Bottom Row Index.
this.gridControl1.ViewLayout.LastVisibleRow.ToString();
//Right Column Index.
this.gridControl1.ViewLayout.LastVisibleCol.ToString();'Top Row Index.
Me.gridControl1.TopRowIndex.ToString()
'Left Column Index.
Me.gridControl1.LeftColIndex.ToString()
'Bottom Row Index.
Me.gridControl1.ViewLayout.LastVisibleRow.ToString()
'Right Column Index.
Me.gridControl1.ViewLayout.LastVisibleCol.ToString()
Figure 1: Visible Row and Column indexes of the GridControl
Samples: