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

The SaveCellInfo event

When I change a value in a cell in my GC so do I check this in the SaveCellInfo-event and save it into a DataView.

When this happend so do I also want to change the BackColor in my GC to something else to indicate the user that the cell has a changed value.
But with this code:

CType(sender, GridControl)(e.RowIndex, e.ColIndex).BackColor = Color.BurlyWood

So do I end up in an infinite loop, since changing the BackColor seems to also raise the SaveCellInfo-event.
Is there a way to change the BackColor in SaveCellInfo without raising the event?


3 Replies

MP Markus Persson November 12, 2008 10:31 AM UTC

I found the SaveCellFormattedText event which seems to be able to do what I want.

However, when I type in a value into my GridControl now I get things like "5 is not a valid value for Decimal." or "Foobar is not a valid value for String." when it tries to run the SaveCellFormattedText event. Why?



MP Markus Persson November 12, 2008 03:42 PM UTC

I noticed that the sender in the SaveCellFormattedText event is GridModel and not GridControl. I solved my problem once I noticed that.



RC Rajadurai C Syncfusion Team November 13, 2008 12:37 PM UTC

Hi Markus,

Thanks for your interest in Syncfusion products.

Glad to hear that your issue has been solved.

Please let us know if you have any further concerns.

Regards,
Rajadurai


Loader.
Live Chat Icon For mobile
Up arrow icon