Articles in this section
Category / Section

How to get the top or bottom and left or right viewable row and column indexes in WinForms GridControl?

1 min read

Row and column index

To get the Top/Left/Bottom/Right viewable Row and Column index of the grid, use the following code.

C#

// 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();

VB

'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()

 

Visible row and column index of the GridControl

Figure 1: Visible Row and Column indexes of the GridControl

Samples:

C#: RowColumnindex-C#

VB: RowColumnindex-VB

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied