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.

Deleting rows from hierarchical GDBG

Thread ID:

Created:

Updated:

Platform:

Replies:

59847 Apr 23,2007 05:16 PM Apr 24,2007 07:38 PM Windows Forms 3
loading
Tags: GridControl
Rob Yang
Asked On April 23, 2007 05:16 PM

Hi - thanks for the assistance so far. We've got a GDBG which shows a hierarchical dataset, similar to the attached project. However, we are running into some strange behavior when the user attempts to delete a row. Sometimes when leaf nodes are deleted the whole branch goes with it. The tree structure seems to redraw strangely too.

I'm not sure if this is an open issue (we're using 4.4.0.54) or if perhaps we need to do something differently - I couldn't find anything in the knowledge base but perhaps I missed something. Thanks for any info !

-Rob


GDBGTreeLinesCustom.zip

haneefm [Syncfusion]
Replied On April 23, 2007 05:32 PM

Hi Rob,

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

Best regards,
Haneef

Rob Yang
Replied On April 23, 2007 08:17 PM

Hi Haneef - thanks for the info. I guess I should clarify : the question I had was in regards to the user selecting the row with the mouse and pressing the Delete key. The grid behaves strangely in that scenario.

Should we add an event handler of some kind to fix this, and if so what should it do ?

-Rob

>Hi Rob,

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

Best regards,
Haneef

haneefm [Syncfusion]
Replied On April 24, 2007 07:38 PM

Hi Rob,

Here is a forum thread that discuss with row deleting event.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=54380

Best regards,
Haneef

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.

;