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.
Mike:
Ignore my prior comment (regarding the UltraDataSource). If I put a date before 1/1/2001, then it reverts back to 1/1/2001. If the UltraDataSource populates a date prior to 1/1/2001, then it puts 1/1/2001 in. Any date after 1/1/2001 works fine. I don't have any properties set that would force a minimum date of 1/1/2001.
Hope that helps.
Kevin
One final follow-up: this only happens with the values that are populated from the UltraDataSource. If I go and enter a date in a blank field and then go back and click on the down arrow to show the calendar, it works fine. But on rows where the cell was populated through the UltraDataSource1.Rows.Add(), it's always reverting back to 1/1/2001.
That's exactly correct. Look at the screen prints. The Before.jpg shows the grid just before I click on the "down arrow" to show the calendar. The "After.jpg" file shows what happens when the calendar appears. It changes to 1/1/2001 and changes the value in the cell to 1/1/2001, too.
I have duplicated this on two separate machines: one running XP Professional (SP3), the other running Windows Server 2003. I have build 2059 installed; isn't that the latest?
Hi Kevin,
I just ran your sample. The very first row in the grid has a Date Of Birth of "12/07/1960". If I understand you correctly, you are saying that when you click the dropdown arrow in this cell, the dropdown shows 1/1/2001 instead of the date in the cell.
But this is not the behavior I get. When I run this sample and dropdown the calendar, I get 12/07/1960 selected on the dropdown, just as I should.
Am I misunderstanding what you are describing? Or are you just getting different behavior?
If the latter, then I recommend that you download and install the latest service release, because it looks like this may be a bug that has already been fixed.
The only other explanation I can think of is that perhaps this is related to some system setting. Perhaps your system date settings are set up in an unusual way - or at least different from mine.
Magued:
The problem is not on a blank cell. That works FINE. The problem is when the cell has a current date value. Go to a cell that has a date value that was populated by the UltraDataSource (NOT one you entered manually). Click on the arrow to show the calendar. It will default to 1//1/2001 and wipe out the current cell's value.