Thursday, November 02, 2006
EPS Date Drop Down class and international date formats
We are just about to release a new version of the Windows UI controls (2.0.x.x), which includes an enhanced version of the EPS date drop down control. (This control is our replacement for the default .NET date/time picker control... for more info on our control, see this post... note that in this latest version, we actually marked the .NET control as obsolete, since so many people used it by accident).
Anyway: This latest version of this control has the ability to parse German dates as well. For instance, "Mon 31.7.2006" is parsed correctly as the 31st of July 2006. (Note: It will also parse it correctly if an incorrect day is specified, such as "Sam 31.7.2006", since the 3-letter day information is ignored for parsing operations).
Note that this now happens completely automatically. The control also does not require a date format string anymore. In the past, the date format string was set to "ddd M/d/yyyy". This string (or the equivalent in each culture) is now assumed automatically. Therefore, the control should automatically work right in each particular culture. Note that if you do set the date format string to something else, you may have to worry about culture information yourself. For instance, if you set the string to "ddd MM/dd/yy" then you must make sure it is set to something appropriate in a different culture if that is of importance to you. If it is set to a simple format instruction on the other hand - such as "d" - then automatic formatting should still work.
The date drop down control has a whole bunch of international stuff built in on top of this. For instance, it respects settings such as the first day of the week (Sunday in the US, Monday in Europe for instance). It also uses local names for days and months and such. This has really been in this control all along, although I tweaked it a bit this time around to make that part more efficient.
Oh, and while I was at it, I also fixed a nasty data binding bug in this control (kinda along with a revamp of the databinding mechanism in Milos in general due to the move to 2.0... although this was slightly different).
Posted @ 11:35 AM by Egger, Markus (firstname.lastname@example.org) - Comments
Thursday, November 02, 2006
New Milos Names Grid
Version 2.0.61002.0 and newer of the Milos Names Components has an enhanced version of the Milos Names Grid. It now has the capability to show names with associated communication information (email, phone numbers, web addresses,...) as well as all the addresses. Here is an example screen shot of the name search pane (this being a specialized version in our internal Olympus software) that uses the names grid:
Note that an unlimited number of communication information items as well as an unlimited number of addresses are showing (each row of the grid grows accordingly). Also, note that the addresses are all formatted properly according to individual international standards. The Austrian example address for instance has the postal code followed by the city, while the US addresses have the city, state, ZIP format.
The names grid also has two other views, one being a very simple grid, the other being a compressed version of the above, showing just one address, as well as email, phone, and URL (if present):
Another interesting aspect is that the grids adjust automatically, based on the data source they are bound to. For instance, if the data source is a DataSet with a single table, and that DataSet contains fields for address, email, and so forth, then the display will appear as show above. The data source can also in itself have related tables for this information, which will also result in correct display. In scenarios where the data source does not have those fields or related tables, the columns showing that information will remain empty, but the grid still continues to function properly.
Of course, the grid (as well as other names components) follow the rules of inheritance and composition. This means that the grid as well as other name components can be used in all kinds of scenarios. Everything shown here is just an example configuration.
Posted @ 11:26 AM by Egger, Markus (email@example.com) - Comments