You are handling QueryRowCount to provide the row count dynamically, correct?
If so. in that handler you can check the cuurentcell. (This is normally not a big performance hit as this event is only raised when a ResetVolatileData is done, and the value is otherwise cached. So, if you are just scrolling or moving the grid, this code shuld not be hit.) You do have to avoid a recursive call though as call CurrentCell.MoveTo to trigger QueryRowCount.
bool isInQueryRowCount = false;
private void gridControl1_QueryRowCount(object sender, GridRowColCountEventArgs e)
{
GridCurrentCell cc = this.gridControl1.CurrentCell;
if(cc.RowIndex > rowCount && !isInQueryRowCount)
{
isInQueryRowCount = true;
cc.MoveTo(rowCount, cc.ColIndex);
isInQueryRowCount = false;
}
e.Count = rowCount;
e.Handled = true;
}