Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
335
UltraDateTimeEditor hide dropdown and use double click instead
posted

Hi

I would like to remove the dropdown button on the DateTimeEditor and instead when the user double clicks then the dates will be shown instead of when clicking the drop down.

The reason for this is I am restricted for space on my forms and the drop down button part of the editor is covering over part of the date as per below.

Thanks

Paul

Parents
No Data
Reply
  • 1560
    Verified Answer
    Offline posted
    Hello Paul,
    I have been looking into your question. In order to achieve your requirement, my suggestion is first to set the DropDownButtonDisplayStyle property to Never. This will remove the DropDown button. It could be set through the Properties window in VisualStudio after the UltraDateTimeEditor has been selected or from code-behind:
    this.ultraDateTimeEditor1.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;
    In order to show the dates on double click, I can recommend to handle the MouseDoubleClick event and in the handler to call the UltraDateTimeEditor's DropDown method:
    private void ultraDateTimeEditor1_MouseDoubleClick(object sender, MouseEventArgs e)
            {
                (sender as UltraDateTimeEditor).DropDown();
            }
    I have attached a sample application that uses this approach.
    If you require any further assistance on the matter, please let me know.
    Sincerely,
    Teodosia Hristodorova
    Associate Software Developer
Children