0

I'm using ASP.NET Dynamic Data.

  1. When table rows are listed in List.aspx there are columns that show the name of tables that have foreign key to this table. These columns are not a field in table and Dynamic Data generates them automatically. How can I remove them?
  2. How can I remove filters that are shown for each table?
Karadous
  • 1,555
  • 3
  • 26
  • 37

2 Answers2

1

Use Metadata tag DisplayAttribute in System.ComponentModel.DataAnnotations. Here is an example to hide the Category column in a table and do not create a filter:

[Display(Name="Categories", AutoGenerateField=false, AutoGenerateFilter=false)]        
public object Cats { get; set; }
Ash Machine
  • 9,601
  • 11
  • 45
  • 52
0

It's just a google away. Also, stack is your friend. Here's a video tutorial that may help you: How to Remove Columns From Your DynamicData Data Grids. Here's a stack post that may also help you: How to hide filtered column with dynamic data site?

Community
  • 1
  • 1
Jeremy
  • 8,902
  • 2
  • 36
  • 44