How to hide filtered column with dynamic data site

2019-09-02 20:35发布

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条回答
姐就是有狂的资本
2楼-- · 2019-09-02 20:45

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.

查看更多
登录 后发表回答