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.

ggc.Table.CancelEdit() - not good enough

Thread ID:

Created:

Updated:

Platform:

Replies:

60620 May 9,2007 08:04 AM May 9,2007 07:34 PM Windows Forms 4
loading
Tags: GridControl
Ryan Hardoon
Asked On May 9, 2007 08:04 AM

Hi everybody,


I have a scenario that requires me to use CancelEdit() from within TableControlCurrentCellAcceptedChanges (when data validation fails).

Using CancelEdit() alone causes "AddNew not called" exception when I re-edit the cell without losing focus.

I tried to send Esc key, but then there are situations in which the cell's buffer (the new-rec buffer actually) is not cleared, and re-entering a field causes the other, previously edited fields, to display the bad data without the TableControlCurrentCellAcceptedChanges validation.

So:
1) (the preferred solution) How do I override the "AddNew" problem ?
2) (an undesired alternative) If the above is impossible, how do I clear the edited cell's buffer after calling CancelEdit() ?


Thnaks in advance.

Ryan Hardoon
Replied On May 9, 2007 08:15 AM

Assuming TableControlCurrentCellAcceptedChanges validation is good, how do I force "AddNew" from within TableControlCurrentCellAcceptedChanges - if and only if the currently edited record does not already represent a valid data (DataRow) in the ggc's DataSource (DataSet) ?

Ryan Hardoon
Replied On May 9, 2007 10:36 AM

I just noticed that SendKeys() actually made no difference.
The cell's buffer is not cleared either way.

Please assist ASAP.


Best regards.

Ryan Hardoon
Replied On May 9, 2007 06:38 PM

Somebody . . .

Anybody . . .

? ? ?

haneefm [Syncfusion]
Replied On May 9, 2007 07:34 PM

Hi Ryan,

If you want to actually add new items to the arraylist(IList) through the GridGroupingControl, then you should also have your arraylist implement IBindingList to support the addnew functionality directly from the grid. Please refer this sample:

C:\Program Files\Syncfusion\Essential Studio\4.4.0.49\windows\Grid.Grouping.Windows\Samples\CustomCollections\StronglyTypedCollection\

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.

;