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 Richard,
Thank you for posting in our forums.
If you want to show both the TextBox and the UltraDataTimeEditor in the cell, you would need to use the UltraControlContainerEditor. If you don’t use an UltraControlContainerEditor as the editor for the grid column, the grid will display only the UltraDateTime editor and it will remove the textbox. Using the UltraControlContainerEditor, will display both controls. For more information on how to embed a control in the UltraGrid using the UltraControlContainerEditor, please follow this link:
http://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/WinControlContainerEditor_Embed_Any_Control_within_WinGrid_Cell_using_ControlContainerEditor_Object.html
Please let me know if you have any additional questions.
Hi, Dimitar
Thanks for your help.
As the help link showed, I was trying with the ControlContainerEditor, and here is what I got:
I'm using an UltraDateTimeEditor as the RenderingControl and a TextBox as the EditingControl, then I set the Editor's(class that extends ControlContainerEditor) object to a UltraWinGrid's cell.
Editor editor = new Editor(this.ultraDateTimeEditor1, this.textBox1);
ColumnsCollection columns = this.ultraGrid1.DisplayLayout.Bands[0].Columns;
columns["XXX"].Editor = editor;
What my question is:
Is the EditingControl is automatically resized by the ControlContainerEditor to fit the cell it is being displayed in? If so, what should I do if I want to select a date from ultraDateTimeEditor1? Is it possible?
Thanks for your concern.