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

GridControl ColCount = 0 firing CurrentCellEditingComplete

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


4 Replies

JJ Jisha Joy Syncfusion Team April 23, 2009 05:35 AM UTC

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




JL Julie Levy April 23, 2009 05:28 PM UTC

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



JL Julie Levy April 23, 2009 05:44 PM UTC

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


JJ Jisha Joy Syncfusion Team April 27, 2009 07:12 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon