Hi,Recently I'm using UltraDateTimeEditor and TextBox to implement something like DateTimePicker.And as the requests, I've implement the component CCalendarCombo, which with a textbox to cover the display area of the UltraDateTimeEditor controland display the value that's selected. Also I could input with some kind of formatted date that I need to process in the TextChanged event.
Here is what my questions is: I read about how to embed any controls in the WinGrid, and that is to use the property EditorComponent. "columns["No"].EditorComponent = this.cCalendarCombo1;"But with that, I couldn't take the component that I've implemented into the WinGrid.Is there something that I'm missing?
I'll attach the sample solution.Could you help me with that? Thanks for your concern.
Hi,
Since your EditingControl is a TextBox, there's no way the DateTimeEditor can ever be dropped down. Once the cell goes into edit mode, the TextBox is used and it has no dropdown, so there's nothing to drop down.
You would have to use a DateTimeEditor as your EditingControl.
In order to enter edit mode and also process the mouse click to drop down a list, you also need to set:
editor.EnterEditModeMouseBehavior = EnterEditModeMouseBehavior.EnterEditModeAndClick;
Hi, Dimitar
Did you solve the question raised on May 19th?
Could you please give me a reply as soon as possible,I'm anxious to use it.
Tannk you ver much !!!
I've got the same question and I'll attach the sample code that I've implement.
My scenario is when the form loaded, the RenderingControl is shown but the when I want to click the drop-down button of the UltraDateTimeEditor,
it just went into edit mode and I couldn't select a date from the calendar and trigger the dateTimeEditor_ValueChanged event.
Could you please help me with that? Thanks a lot.
Sorry, I did not understand your question.
Assuming you have a UserControl with a TextBox and an UltraDateTimeEditor, what you need to do is override the UserControl's PreferredSize property and return a value that is large enough to accommodate the size of both controls.
Hi Richard,
Thank you for the reply.
I am not sure if I understand you correctly. The sizes of the Rendering and Editing controls are determined by the size of the column that they are embedded. Still this should allow you to drop down the UltraDateTimeEditor without any issues as the drop down arrow should be always displayed. Keep in mind that the UltraDateTimeEditor will only be displayed once the cell is in edit mode. Also you can control the sizes of the Rendering and Editing control from the width of the column.
Is the dropdown arrow cut-off for you? If yes, please send me a sample and I will be glad to research this further for you.
I am looking forward to hearing from you.