T Terry Olsen Nov 24, 2004 #1 I need a way to programmatically tell if a row is visible or has scrolled out of view. Any Ideas? Thanks!
I need a way to programmatically tell if a row is visible or has scrolled out of view. Any Ideas? Thanks!
K Ken Tucker [MVP] Nov 24, 2004 #2 Hi, In form load event save location of first cell in datagrid. pt = dg.GetCellBounds(0, 0).Location To get first visible cell and number of visible cells Dim hti As DataGrid.HitTestInfo = dg.HitTest(pt) Dim newRow As Integer = hti.Row Trace.WriteLine(String.Format("First Row {0} Visible rows {1}", hti.Row, dg.VisibleRowCount)) Ken
Hi, In form load event save location of first cell in datagrid. pt = dg.GetCellBounds(0, 0).Location To get first visible cell and number of visible cells Dim hti As DataGrid.HitTestInfo = dg.HitTest(pt) Dim newRow As Integer = hti.Row Trace.WriteLine(String.Format("First Row {0} Visible rows {1}", hti.Row, dg.VisibleRowCount)) Ken