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.

GridControl ColCount = 0 firing CurrentCellEditingComplete

Thread ID:

Created:

Updated:

Platform:

Replies:

80696 Apr 22,2009 06:04 PM Apr 27,2009 03:12 AM Windows Forms 4
loading
Tags: GridControl
Julie Levy
Asked On April 22, 2009 06:04 PM

When i rebuild the grid with new data and columns, i set ColCount=0. This, however, causes the editingcomplete event to fire which causes some of my update code to execute. How can i prevent this event from firing or tell in the event's handling that the columns are being cleared and i can ignore the change. I know i can set a flag, but if there's a way i can avoid doing this, please let me know.

We are on version 5.2.0.25

Thanks,
Julie


Jisha Joy [Syncfusion]
Replied On April 23, 2009 01:35 AM

Hi Julie,

Thank you for posting query to us.

Could you please reproduce the issue in the below sample?. So that we could analyze it further and provide you a solution soon.


GCEditingComp.zip

Regards,
Jisha



Julie Levy
Replied On April 23, 2009 01:28 PM

ok - i'll work on it and get back to you.
In the meantime, here's some more information:
The currentcell which is triggering the event is a dropdown cell. And in the event i check for IsInEndEdit and IsInDeactivate. EndEdit is false, but Deactivate is true. That's why my code is executing in the event handler.

Thanks,
Julie


Julie Levy
Replied On April 23, 2009 01:44 PM

Hi -
Here's the updated sample where you can reproduce my issue. Steps to reproduce are:

1. Load the form.
2. change the selected value of one of the dropdown cells.
3. hit the button.

I know there's an edit, but i don't care about it. The user has indicated that the change should be thrown away by performing an action that requires the grid to reload. I am checking for IsInDeactivate in the event handler based on instructions i received from this forum to deal with another issue but i'm not sure what case it handles.

Thanks,
Julie




GCEditingComp_c7af2c38.zip

Jisha Joy [Syncfusion]
Replied On April 27, 2009 03:12 AM

Hi Julie,

Thank you for details.

If a cell get the edit cursor, then EditingComplete will be hit whether or not a change was made while the cell was in the edit mode. Please try handling CurrentCellAcceptedChanges event to write your update code as it is only hit if a change is actually made.

Please let me know if this does not serve your needs.

Regards,
Jisha


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.

;