Mercury.QTP.CustomServer Namespace > VerificationServerBase Class : GetTableRowRange Method |
If the index of the last visible row cannot be determined, set both pLastVisible and pFirstVisible to -1.
Row indexes are 0-based.
'Declaration
Protected MustOverride Sub GetTableRowRange( _ ByRef pFirstVisible As System.Integer, _ ByRef pLastVisible As System.Integer, _ ByRef pTotal As System.Integer _ )
protected abstract void GetTableRowRange( out System.int pFirstVisible, out System.int pLastVisible, out System.int pTotal )
Parameters
- pFirstVisible
- Index of first visible row.
- pLastVisible
- Index of last visible row.
- pTotal
- Total number of rows in the table.
protected override void GetTableRowRange (out int FirstVisible, out int LastVisible, out int Total) { DataGridView GridView = (DataGridView)(this.SourceControl); DataGridViewRowCollection Rows = GridView.Rows; FirstVisible = -1; LastVisible = Rows.Count -1; for (int i = 0; i < Rows.Count; i++) { if (Rows[i].Visible == false) continue; FirstVisible = i; break; } for (int i = FirstVisible + 1; i < Rows.Count; i++) { if (Rows[i].Visible) continue; LastVisible = i; break; } FirstVisible++; LastVisible++; Total = GridView.Rows.Count; }