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 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
ADAdministrator Syncfusion Team 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.