Question

I am using ASP.NET Dynamic Data. The page dynamically creates a List, Edit, Details pages to display the records stored in the table in the DB.

I have the Sub Contractors in the table but I want its visibility set to false on screen. I've tried

[HideColumnIn(PageTemplate.List)]
[Display(Name = "SubContractor Id", Order = 70)]
public object SubContractorId { get; set; }

ALSO:

[ReadOnlyColumnIn(PageTemplate.List)]

But no joy. Iv made these changes in the database.cs file. Anyone know how can I make it disappear or remove the hyperlink from it?

EDIT:

[ScaffoldColumn(false)] usually works but because SubContractorId is a FK it seems to not take effect.

Était-ce utile?

La solution

Consider the possibility of using Custom pages (List and other) for your Dynamic Data site which allows you hide specific fields.

For more information: How to: Customize the Layout of an Individual Table By Using a Custom Page Template

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top