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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Move rows up and down in the GridDataBoundGrid

Thread ID:





6775 Aug 27,2003 03:28 PM UTC Aug 27,2003 07:47 PM UTC WinForms 1
Tags: GridControl
Shulin He
Asked On August 27, 2003 03:28 PM UTC

I tried to move rows up and down in the GridDataBoundGrid. It worked fine in the grid. But it was not updated in the DataSet or DataTable object because the data still had the same sequence after I saved and reloaded. I checked my code that I have called the AcceptChanges() method in the either the DataTable or the DataSet object. Any ideas what happened? The following is the code, public void MoveDown() { gdbgCmdItems.BeginUpdate(); int gridRow = gdbgCmdItems.CurrentCell.RowIndex; int tableRow = gdbgCmdItems.Binder.RowIndexToPosition(gridRow); SwapRows(tableRow, tableRow + 1); gdbgCmdItems.CurrentCell.MoveTo(gridRow+1, 1); gdbgCmdItems.EndUpdate(); gdbgCmdItems.RefreshRange(GridRangeInfo.Rows(gridRow, gridRow+1)); CmdsData.CmdItems.AcceptChanges(); } Sam

Administrator [Syncfusion]
Replied On August 27, 2003 07:47 PM UTC

In this thread http://www.syncfusion.com/forums/message.asp?MessageID=4419, a second sample was just posted that will actually reaarange the rows in the DataTable.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon