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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

cutting rows

Thread ID:





27851 Apr 19,2005 03:26 PM UTC Apr 19,2005 03:38 PM UTC WinForms 1
Tags: GridControl
Raul Rosenthal
Asked On April 19, 2005 03:26 PM UTC

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.

Administrator [Syncfusion]
Replied On 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.)


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

or the page will be automatically redirected to 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