问题
I have 'ProductType' column filtered, but it still is in data grid. If I apply ScaffoldColumn(false) filtering feature will disappear...
How to hide column and keep filtering option?
Thanks.
回答1:
I think you may need something like this :
[Display(Name = "Product Type", AutoGenerateFilter = true, AutoGenerateField = false)]
public object ProductType { get; set; }
Or, you'll need to extend the Metadata for that column. Steve Naughton shows how here.
来源:https://stackoverflow.com/questions/6048963/how-to-hide-filtered-column-with-dynamic-data-site