twitter.bootstrap.mvc icon indicating copy to clipboard operation
twitter.bootstrap.mvc copied to clipboard

Support for ScaffoldColumn Attribute

Open davinic opened this issue 11 years ago • 2 comments

Bootstrap default templates ignore ScaffoldColumn() annotations. In my project I've corrected this by updating the VisibleProperties() extension methods with an additional where clause:

.Where(info => info.GetCustomAttribute<System.ComponentModel.DataAnnotations.ScaffoldColumnAttribute>(false)==null || info.GetCustomAttribute<System.ComponentModel.DataAnnotations.ScaffoldColumnAttribute>(false).Scaffold)

davinic avatar Mar 27 '13 19:03 davinic

Good point. The net data annotation [Display(AutoGenerate=false)] is not supported by the bootstrap shared views yet (#83), but should be. I guess [Display(AutoGenerate=false)] should be checked too when generating the template, in addition to the check you mention above.

serra avatar Mar 28 '13 08:03 serra

Please note that I have pull request #29 open with significant changes to the templates; consider adding your changes on top of that.

serra avatar Mar 28 '13 08:03 serra