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 bound grid.
When I select some rows and the invoke myGrid.Model.CutPaste.Cut() the rows are made empty, but are still there. I expected them to go away.
What am I doing wrong?
Also, I tried to remove the rows myself, with this code:
foreach ( GridRangeInfo r in myGrid.Selections.GetSelectedRows( true, true ) )
{
myGrid.Model.Rows.RemoveRange( r.Top, r.Bottom );
}
but it crashes with an out of bound index.
ADAdministrator Syncfusion Team April 19, 2005 03:38 PM UTC
Cutting just clears the data, it does not remove the rows. So you will have to remove them yourself. But instead of grid.model.Rows.RemoveRange, try using grid.Binder.RemoveRecords. (This method accepts zero-index values, so you should use grid.Binder.RowIndexToPosition to convert the two row indexes from the range into the top an dbottom positions.)