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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





15365 Jun 16,2004 05:55 PM UTC Jun 16,2004 07:23 PM UTC WinForms 2
Tags: GridControl
Lori S. Pearsall
Asked On June 16, 2004 05:55 PM UTC

I have the following data in a grid (with 1 child GridHierarchyLevel) : Parent 1 Child 1 Parent 2 Child 1 "Append Row" If the children are collapsed and I select Parent 2, I get a RowIndex of 2 from the selected range and pass it to DeleteAtRowIndex - this works. If the children are expanded and I select Parent 2, I get a RowIndex of 3 from the selected range and pass it to DeleteAtRowIndex - this doesn''t work because it thinks I''m trying to delete the "append row". What am I missing here? What conversion should I be performing on the row indices in the selection range to get an index that DeleteRowAtIndex wants?

Administrator [Syncfusion]
Replied On June 16, 2004 06:11 PM UTC

In a Expand-type grid, you will not be able to use DeleteAtRowIndex to delete arbitrary rows. It is easier to work directly with the CurrencyManager. From the grid row index, you can get the GridBoundRecordState of the row. From the recordstate, you can get the currencymanager and the position in the list. From there, you can use currencyManager.List.RemoveAt to remove the datarow. See this thread for some code snippets. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=15342

Lori S. Pearsall
Replied On June 16, 2004 07:23 PM UTC

That works perfectly!


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