Last post May 28, 2009 01:39 PM by ricka6
May 27, 2009 11:42 PM|zzdfc|LINK
In the DD 1.0:
I can custom field displayname and control how many field to display with customing IAutoFieldGenerator In the page list.aspx and detail.aspx
but in the DD preview 4:
page detail.aspx replace DetailView with FormView, FormView don't use class of customing IAutoFieldGenerator ,How to do?
In the EntityTemplates,How to custom field displayname and control how many field to display ? example:don't display ForignKey column or children column or both?
May 28, 2009 05:22 AM|sjnaughton|LINK
Hi Zzdfc, you will find in the Default.ascx (Entity Template) that it is using the method Table.GetScaffoldColumns() in it's OnLoad event you could override this and add your own column generator. Infact my approach would be to pass into the IAutoFieldGenerator
an IQueryable<Column> and then pass the same into the Default EntityTemplate so that you only have on piece of code generating your columns.
Also see my article on generating Templates for FormView. (Not as cool as Entity Templates though [:D])
Custom PageTemplates Part 4 - Dynamic/Templated FromView
May 28, 2009 05:30 AM|sjnaughton|LINK
Another approach (mentioned to me by David Ebbo) would be to extend the MetaTable class and then override the GetScffoldColumns() method see Davids comment below.
1. Another approach is to extend MetaTable and override GetScaffoldColumns(). Doing this will let you affect the column set used by all pages, without having to change any of them. If you look at the Futures sample in preview 4, there is a sample of doing this.
Specifically, look for CustomMetaModel and CustomMetaTable.
May 28, 2009 10:11 AM|zzdfc|LINK
I look at the Futures sample in preview 4, it havn't EntityTemplates.
Will Dynamic Data 4.0 RTM include EntityTemplates feature ?
May 28, 2009 11:32 AM|ricka6|LINK
Yes, Entity Templates are part of the Visual Studio 2010 Beta release. See
May 28, 2009 11:42 AM|zzdfc|LINK
whose version is latest between DD preview4 and dd of the Visual Studio 2010 Beta ?
which version We should use ?
May 28, 2009 01:39 PM|ricka6|LINK