The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I would like to programatically scroll my GDBG to a certain row in the grid, making that row the first visible one at the top.
I think I''m *almost* there, with this (targetRow comes from looking through my bound DataView):
firstRow = grid1.Binder.ListManagerPositionToRowIndex(targetRow);
Then I call this (is MoveTo() the best way to do this?)...
grid1.CurrentCell.MoveTo(firstRow,2, GRID.GridSetCurrentCellOptions.ForceRefresh | GRID.GridSetCurrentCellOptions.ScrollInView );
...but it seems to scroll the grid so that this cell is barely visible at the bottom of the grid.
So what''s the best way to get this to the top?
Any way to get this to the top?
ADAdministrator Syncfusion Team June 25, 2004 03:27 PM UTC
Try using grid.ScrollCellInView to see if that does what you need.
You can also explicitly set this.grid.TopRowIndex to specify what you want as the top row.
DADanJune 25, 2004 06:08 PM UTC
Thanks Clay!
TopRowIndex ended up being what I needed. The help seems a little "off" on this one, says:
"Gets or sets the column index of the left column. Scrolls the grid when changed."
column index?
They ScrollCellInView seems to do the same thing, and I guess have the additional feature that you can get horizontal scrolling involved if the cell is way off the view to the right.
Thanks again!