We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Moving the current row in a virtual grid

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

2 Replies

AD Administrator 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


AD Administrator 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

Loader.
Live Chat Icon For mobile
Up arrow icon