How to hide filtered column with dynamic data site?

做~自己de王妃 提交于 2019-12-25 16:43:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!