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 have a virtual grid loaded with data from a SQL table. I''m adding a new row to the bottom of the DataTable for the user to add new data. The current grid row is somewhere at the top of the virtual grid and I would like to move the current row to the last row in the grid/datatable. I''ve looked through the online fourms, knowledge base and have been unable to find a way to repostion the current row of a virtal grid programatically.
Thanks
Patrick
ADAdministrator Syncfusion Team May 10, 2006 08:52 AM UTC
Hi Patrick,
In a virtual grid, there is no built-in support for row re-ordering. The reason for this is in a virtual Grid, the data is maintained separately and is provided on demand to the grid using the QueryCellInfo event handler. So whatever the data comes in through this event handler, the grid just displays it. It has no control over the external datasource.
Row Re-ordering:
You could maintain any moved row positions in a hashtable and display this element using QueryCellInfo event.Please refer to the attached sample for more details.
Here is the sample.
http://www.syncfusion.com/Support/user/uploads/VirtualGridMoveRange_c891fda5.zip
Please let me know if this helps.
Best Regards,
Haneef
ADAdministrator Syncfusion Team May 10, 2006 09:31 AM UTC
Hi Patrick,
Sorry for the inconvenience caused.
Do you want to move the currentcell to the addnew row (not really move the data)? If so, you need to call grid.CurrentCell.MoveTo method. If you want to scroll the grid to make this new row visible, you can call grid.ScrollCellInView method.
Thanks for choosing Syncfusion Prodcuts.
Best Regards,
Haneef