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.
Unfortunately, activation email could not send to your email. Please try again.

cutting rows

Thread ID:

Created:

Updated:

Platform:

Replies:

27851 Apr 19,2005 11:26 AM Apr 19,2005 11:38 AM Windows Forms 1
loading
Tags: GridControl
Raul Rosenthal
Asked On April 19, 2005 11:26 AM

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 11:38 AM

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.)

CONFIRMATION

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.

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.

;