I have an UltraGrid bound to an UltraDataSource. One of the fields (DateOfBirth) is a date field. When the user clicks the "down" arrow to the right of the date (to pop up the calendar), it always defaults to 1/1/2001 (rather than the date in the cell) and then changes the date in the cell to 1/1/2001 once it has "popped up".
How do I get the UltraGrid to show the correct date (on the pop-up calendar) based on what is in the cell? For example, if the date in the cell is "5/1/1952", that's the date I want to show up when the user pops up the calendar -- not 1/1/2001.
Bfore-and-after screens shots are included.
Hi,
If you have an older version of the grid, the property used to be called EditorControl. It was changed to EditorComponent a few years ago.
That's why i attended to do but UltraWinGrid.UltraGridColumn doest not contan a definition for EditorComponent
Hi Vianney,
I would use the grid's InitializeLayout event and do something like this:
e.Layout.Bands[0].Columns["My Column"].EditorComponent = this.ultraCalendarCombo1;
Hi Mike,
Thank you for your answer , i've found the UltraCalendarCombo & UltraCalendarInfo in my form and it's exactly what i was searching for.
But how do i set the grid colum's editor component to the UltraCalendarCombo ?
Vianney
By default, DateTime columns in the grid use the DateTimeEditor, which uses as it's dropdown, the inbox MonthCalendar control. This control does not have the ability to disable or remove days of the week, as far as I can see.
So what you could do is use the UltraCalendarCombo control. Place one on a form, along with an UltraCalendarInfo component. Set the UltraCalendarComb's CalendarInfo to the UltraCalendarInfo component.
Then you can use the CalendarInfo's DaysOfWeek collection to hide any days you want.
Set the grid column's EditorComponent property to the UltraCalendarCombo control and it will replace the default dropdown.