如何隐藏带有动态数据站点的过滤列? [英] How to hide filtered column with dynamic data site?

查看:75
本文介绍了如何隐藏带有动态数据站点的过滤列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经过滤了"ProductType"列,但是它仍然在数据网格中.如果我应用ScaffoldColumn(false),过滤功能将消失...

如何隐藏列并保留过滤选项?

谢谢.

解决方案

我认为您可能需要这样的东西:

[Display(Name = "Product Type", AutoGenerateFilter = true, AutoGenerateField = false)]
public object ProductType { get; set; }

或者,您需要扩展该列的元数据.史蒂夫·诺顿(Steve Naughton)演示了如何此处./p>

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.

解决方案

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.

这篇关于如何隐藏带有动态数据站点的过滤列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆