Databinding and radDateTimePicker

2 posts, 0 answers
  1. Lasse
    Lasse avatar
    21 posts
    Member since:
    Jul 2011

    Posted 15 Dec 2011 Link to this post

    Hi

    I have a problem with the ValueChanged event. It does not fire when i populate the record, but when the control is shown.
    This is because the control is binded to the object. So I really dont know if the change is done by the user or bye the binding it self. 
    Is there a way to check if the value is set by the object binding or by the user?

    Regards
    Svein Thomas

  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 19 Dec 2011 Link to this post

    Hi Svein,

    Thank you for writing.

    I suppose that your question is related to the RadDateTimePicker control. You should use IsKeyBoard property, for example:

    void radDateTimePicker1_ValueChanged(object sender, EventArgs e)
    {
        if (radDateTimePicker1.DateTimePickerElement.TextBoxElement.IsKeyBoard)//user input
        {
        }
    }

    I hope this helps.

    Regards,
    Peter
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top