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
130
Programmatically create an UltraComboCalendar
posted

Is it possible to programmatically create an UltraComboCalendar and display it at a given Point in an UltraGrid?

For example: I have an UltraGrid with a Checkbox column, when the cell is clicked the checkbox is checked. As the cell is clicked (or when the checkbox is checked), I'd like to programmatically create an UltraComboCalendar and have it draw next to the cell that was clicked. The selected date will then be added to another control's Text property.

I've been able to create the UltraCalendarCombo when the cell is clicked:

var ucc = new UltraCalendarCombo();
// the UltraGrid to attach the calendar 
// (just assumed it had to be added to the controls)
ugLLTasks.Controls.Add( ucc ); 
ucc.BackColor = SystemColors.Window;
ucc.DateButtons.Add( new DateButton() );
// general location for testing
ucc.Location = new Point( 200, 200 ); 
ucc.Name = "uccTempServiceDate";
ucc.NonAutoSizeHeight = 21;
ucc.Size = new Size( 100, 21 );
ucc.Show();

The problems I'm running to:

1. The only events I have to work with right now are from the CellChange events (object sender, CellEventArgs e) and I can not find a Point for the Location property of the UltraCalendarCombo.

2. I'm not sure how to programmatically show/hide the calendar (sort of tied to #3).

3. When I've added GotFocus and LostFocus events to the UltraCalendarCombo, the events never fire.

Any guidance or advice would be appreciated.

Thanks!
::k::

Parents Reply Children
No Data