UPDATE: You can download the latest Dynamic Data bits from here.
It seems that I've managed to mess things up in my
previous blog post. The sample web site and user controls work but ... they are using the December CTP release of ASP.NET Dynamic Data! Kudos to
Scott Hunter for spotting the problem. It seems that albeit I installed the latest Dynamic Data bits I forgot to uninstall the December CTP and Visual Studio 2008 was still using the old Web Site template. Be careful when installing the new bits - uninstall any previous releases first!
The sample web site and field template user controls have been updated. Please download it from
here. Keep in mind that the RenderHint attribute is replaced by the UIHint attribute. The semantics of using that attribute have also changed. Now you need a MetaDataType object on which you apply the UIHint attribute. Here is the modified code for the Order object:
[MetadataType(typeof(OrderMetadata))] |
public partial class Order |
{ |
|
} |
|
public class OrderMetadata |
{ |
[UIHint("DateTimeTelerik")] |
public object OrderDate { get; set; } |
|
[UIHint("DateTimeTelerik")] |
public object RequiredDate { get; set; } |
|
[UIHint("DateTimeTelerik")] |
public object ShippedDate { get; set; } |
|
[UIHint("ForeignKeyTelerik")] |
public object Customer { get; set; } |
|
[UIHint("ForeignKeyTelerik")] |
public object Employee { get; set; } |
|
[UIHint("IntegerTelerik")] |
[Range(1, 3)] |
public object ShipVia { get; set; } |
|
[UIHint("DecimalTelerik")] |
public object Freight { get; set; } |
|
[UIHint("TextTelerik")] |
public object ShipName { get; set; } |
|
[UIHint("TextTelerik")] |
public object ShipAddress { get; set; } |
|
[UIHint("TextTelerik")] |
public object ShipCity { get; set; } |
|
[UIHint("TextTelerik")] |
public object ShipRegion { get; set; } |
|
[UIHint("TextTelerik")] |
public object ShipPostalCode { get; set; } |
|
[UIHint("TextTelerik")] |
public object ShipCountry { get; set; } |
} |
|