Ticket T219804
Visible to All Users

dxBarDateCombo

created 10 years ago (modified 10 years ago)

Hello

I need some help with TdxBar DateCombo component.
This component has no methods for validation. What way am I  able to check value of this control?

For example, user clears value of the control, so dxBar DateCombo.Date will be -7000 after it. But is's necessary to prevent changing and  show message for user (like this 'Invalid DateTime Value!'). Is it possible?

And the another question about  incorrect value of the control. Can i check value before message 'Could not convert variant of type (UnicodeString) into type (Date)'  will be shown?

Comments (1)
AS AS
Aleksey Schibaev 10 years ago

    19 hours late. Do somebody answer me?

    Answers approved by DevExpress Support

    created 10 years ago

    Hello Aleksey,

    I think that it is more convenient in your scenario to use the TcxBarEditItem item with Properties = DateEdit. This editor has the Properties.OnValidate event that you can use to validate the date value similarly to how it can be done in our standalone editors.

      Show previous comments (5)
      DevExpress Support Team 10 years ago

        Aleksey,

        Usually we answer incoming inquiries within 24 hours (one business day), with the exception of messages received immediately before the weekend or during holidays. We appreciate your patience.

        1. The best way to get/set the TcxBarEditItem items's value is to use the TcxBarEditItem.EditValue property. For example:
        Delphi
        cxBarEditItem1.EditValue := EncodeDate(2015, 1, 1);
        1. I have reproduced the error message appearing twice and will discuss this scenario with our developers;
        2. Would you please provide us with the step-by-step instructions on how to reproduce the 'Control '' has no parent window' error with your project?
        AS AS
        Aleksey Schibaev 10 years ago
          1. Ok, EditValue is good for properties = DateEdit. But what should i do with properties = CheckComboBox, for example? ) Or some other controls like CheckGroup?
          2. Ok, thank you.
          3. Just clear value of Control. After loosing focus there are two exceptions with my text ('Error') and then exception 'Control…' is displayed. Don't you have it?
          DevExpress Support Team 10 years ago

            Aleksey,

            1. EditValue allows you to set a value for TcxBarEditItem with any properties. Please review the TcxBarEditItem with TcxCustomCheckGroupProperties ticket to see how to accomplish this task with CheckComboBox.
            2. Thank you for your clarification. I have reproduced this error too. It seems that the OnValidate event does not work as I expected. I have created a separate ticket (dxBarDateCombo - the OnValidate event does not work as expected) and forwarded it to our developers for research.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.