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.
If simply clicking the dropdown arrow is changing the date in the cell, then something is wrong. This is obviously not the intended behavior. I've never heard of that happening before. My best guess is that the field is not actually using the DateTime data type. Or perhaps something in your code is changing the value inadvertently.
If that does not help, then I'm not sure what else it could be. Can you post a small sample project demonstrating the issue? If so, I'd be happy to take a look.
Hi Mike:
Here is the test project. I checked to make sure that the fields are dates (which they are). If you MANUALLY enter dates into the column, then the dropdown calendar works fine. But if the data is read in from a DataSource, then it always reverts back to 1/1/2001. I have confirmed this on two separate projects.
Can you check and see what I am doing wrong? I put "EXIT SUB' statements in all my UltraGrid events just to make sure that my code wasn't causing this (which doesn't seem to be the case).
Kevin
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.
Mike:
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?
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.
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.
As I said, this is not the behavior I am getting. It works fine for me. So either I have a newer version than you - in which case you should get the latest service release (you can download it here: My Infragistics Keys and Downloads - Download Anything and Everything You Own)
Or, this is related to some system setting.
I suspect the former.
Hi Mike,
With this hotfix my problem was solved too. Thanks!
Calin
I just downloaded build 2068 version of NetAdvantage 2008 V3 and now it is working perfectly. Evidently there is something weird going on in the NetAdvantage 2008 V3 build 2059 that is causing this discrepancy.
I also downloaded the latest hotfix for NetAdvantage 2009 V1 (build 2013) and it works fine in that build, too.
Thanks again,