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.
Hello,
I have a DataTable attached to a gdbg with a currencymanager.
When i save my info, i want to clear out all records in my DataTable and refill it with its original data.
My code:
dt.Update();
int i = cm.CurrentPosition;
cm.SuspendBinding();
dt.Fill();
cm.ResumeBinding();
cm.CurrentPosition = i;
It works fine but i lost the selected row. My grid show the ten first line of the DataTable anf if my current position is 20, i don’t show this line.
(I have to scroll to show the line)
I try
gdg.Selections.SelectRange(GridRangeInfo.Row(gdg.Binder.PositionToRowIndex(i)),false);
but it doesn’t work.
Another solution is perhaps to save the position of the scrollBar but i dont’t find how to do that.
Thanks
ADAdministrator Syncfusion Team January 20, 2005 01:35 PM
The code you listed:
gdg.Selections.SelectRange(GridRangeInfo.Row(gdg.Binder.PositionToRowIndex(i)),false);
should select the row. But if you also want to scroll it into view, then also call gdg.ScrollCellInView.
ADAdministrator Syncfusion Team January 20, 2005 02:12 PM