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
close icon

databoundgrid format exception

hi there, I am having a problem in handling an exception during updation of an existing row or creation of a new row from a GDBG. Everytime I want to update a particular cell to null , it will throw an exception and the cursor will stick on that cell until I pressed esc. My questions are, 1. how do i change the error message thrown if possible ? 2. Is there a way to make the cursor moveable after the exception thrown? I have tried to handle the exception through some events such as, deactivating, deactivatedfailed, validating ,etc. But then, number of messages pop up in 1 time when exception is thrown becomes vary, can be more then 1 time and if I close the application before fixing up the cell, the application will pop up around 4 messages. Just wondering why does it work like this ? cheers, adit

1 Reply

AD Administrator Syncfusion Team January 16, 2005 11:37 AM UTC

1) In CurrentCellValidating (or ValidateFailed), set grid.CurrentCell.ErrorMessage to be the message you want to see. 2) If the datacolumn in your datasource has its AllowDBNull = false, then you will not be able to leave the cell empty. But if you have this property set to true, then you should be able to leave teh cell empty. Earlier versions had a problem in some situations doing this, but we think all that corrected in the 2.1.0.9 code or later. If you are using 2109 or later, can you tell us how to se ethe problem in one of our samples? Or, can you upload a sample showing this problem?

Loader.
Live Chat Icon For mobile
Up arrow icon