Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In ASP.NET MVC(3), is there any attribute to force the view generator to don't display Property

I have a model with some properties, but I just need some of them display in views like List view, also I need to display all of the properties in create or edit views so I can create a full data covered rows, is there any attribute to force the generator to don't display properties in List View. some thing like this [Display(false)] ?

like image 661
Saeid Avatar asked Dec 18 '25 23:12

Saeid


2 Answers

Anwar was close, it's [ScaffoldColumn(false)]

like image 103
Erik Funkenbusch Avatar answered Dec 21 '25 13:12

Erik Funkenbusch


Decorate your attribute with

using System.ComponentModel.DataAnnotations;
[ScaffoldColumn(false)]
like image 28
Anwar Avatar answered Dec 21 '25 12:12

Anwar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!