Telerik blogs

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 { getset; } 
 
    [UIHint("DateTimeTelerik")] 
    public object RequiredDate { getset; } 
 
    [UIHint("DateTimeTelerik")] 
    public object ShippedDate { getset; } 
 
    [UIHint("ForeignKeyTelerik")] 
    public object Customer { getset; } 
 
    [UIHint("ForeignKeyTelerik")] 
    public object Employee { getset; } 
 
    [UIHint("IntegerTelerik")] 
    [Range(1, 3)] 
    public object ShipVia { getset; } 
 
    [UIHint("DecimalTelerik")] 
    public object Freight { getset; } 
 
    [UIHint("TextTelerik")] 
    public object ShipName { getset; } 
     
    [UIHint("TextTelerik")] 
    public object ShipAddress { getset; } 
     
    [UIHint("TextTelerik")] 
    public object ShipCity { getset; } 
     
    [UIHint("TextTelerik")] 
    public object ShipRegion { getset; } 
     
    [UIHint("TextTelerik")] 
    public object ShipPostalCode { getset; } 
 
    [UIHint("TextTelerik")] 
    public object ShipCountry { getset; } 
 



About the Author

Iana Tsolova

is Product Manager at Telerik’s DevTools division. She joined the company back in the beginning of 2008 as a Support Officer and has since occupied various positions at Telerik, including Senior Support Officer, Team Lead at one of the ASP.NET AJAX teams and Technical Support Director. Iana’s main interests are web development, reading articles related to geography, wild nature and latest renewable energy technologies.

Comments

Comments are disabled in preview mode.