Description:
How can I get the number of rows that appear on screen?
Answer:
First, you need to obtain the GridViewInfo object of your GridView class. Then get the required information from the GridViewInfo.RowsInfo property. Please refer to article #2624 for the code for the GetGridViewInfo function used in the following code.
C#using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
GridViewInfo info = GetGridViewInfo(gridView1);
Text = info.RowsInfo.Count.ToString();
Visual BasicImports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraGrid.Views.Grid.ViewInfo
Dim info As GridViewInfo = GetGridViewInfo(GridView1)
Text = info.RowsInfo.Count.ToString()
See Also:
How to access the GridViewInfo object of the GridView class in XtraGrid