New Posts New Posts RSS Feed: ESC key will ignore DecimalRangeVerifier validation error in XtraGrid and accept the invalid value?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Forum LockedESC key will ignore DecimalRangeVerifier validation error in XtraGrid and accept the invalid value?

 Post Reply Post Reply
Author
Suah View Drop Down
Newbie
Newbie
Avatar

Joined: 06-Jul-2009
Posts: 16
Post Options Post Options   Quote Suah Quote  Post ReplyReply Direct Link To This Post Topic: ESC key will ignore DecimalRangeVerifier validation error in XtraGrid and accept the invalid value?
    Posted: 15-Jul-2011 at 8:05am

DevForce 5.2.8 XtraGridBindingManager +DevExpress 9.3.4

DevForce generates validation attributes of DevForce type.

I've written verifiers in the entity class to be used in the way of DevForce validation via verifier .

Most of them work fine, if there's a validation error in a cell, press ESC key will revert the value back to the original valid value. (Works fine with a stringLengthVerifier).

But with a decimalRangeVerifier, the strange thing is press ESC key will ignore the validation error and accept the value.

Have you ever noticed similar problem before? Any suggestions?


A:

Hi Vincent,

Thank you for contacting us.

Since the problem occurs only with the XtraGridBindingManager component, it is likely related to its implementation. In any case, we will do our best to help you.

When an ESC key is pressed, our GridView just destroys an active editor without saving its value. This means that this value comes from another place. Try to handle the View.CellValueChanged event, type some invalid value in a cell and press the ESC key. Is this event raised during typing? If so, please put a breakpoint in this event handler and send us the resulting stack trace. We will try to find the culprit.

BTW, Please don't forget to uncheck the Enable Just My Code (Managed Only) checkbox in the Debugging node of the Visual Studio Tools | Options... dialog. Otherwise, your call stack will be incomplete.

Looking forward to hearing from you.

Thanks
Dimitros


Reply:

Thanks Dimitros,

I've tried the CellValueChanged event,

{
give an invalid value, press Enter triggers the validation error(Editor keydown then validatingEditor event fired,
before leaving validating editor event handler, by looking at the Entity it still has the old valid value).
press ESC key, editor keydown event fired, no validting editor event or cellValuechanged event fired,
this ignore the validation error and accept the invalid value,
}

If type an invalid value and don't press Enter key to validate, press ESC key will close the editor and discard the change.

 (My trouble is DevForce's DecimalRangeVerifier).


//===========

Any one know this problem?

Back to Top
Suah View Drop Down
Newbie
Newbie
Avatar

Joined: 06-Jul-2009
Posts: 16
Post Options Post Options   Quote Suah Quote  Post ReplyReply Direct Link To This Post Posted: 15-Jul-2011 at 6:18pm
Tried to put in a NumricRangeConverter into the XtraGridBindingManager, now it works.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down