我试着从这个页面使用Grid.MVC中的过滤器来显示对文本、数字、布尔和日期的适当过滤。
我很难正确地理解它。当我添加添加过滤器的代码行时,过滤器甚至都没有打开,这就是代码行:
columns.Add(model => model.NMLS).Titled("NMLS").Sortable(true).Filterable(true).SetFilterWidgetType("BooleanFilterWidget");当我没有这行代码时,它正在打开过滤器:
SetFilterWidgetType("BooleanFilterWidget");但是我需要使用不同的滤镜来使它更亲切。bool,date...)
发布于 2015-11-21 03:00:39
使用
SetFilterWidgetType("System.Boolean") 才能让它工作。
Grid.Mvc支持几种类型的列(在Add方法中指定):
System.String
System.Int32
System.Int64
System.Boolean
System.DateTime
System.Decimal
System.Byte
System.Double
System.Singlehttps://stackoverflow.com/questions/33617037
复制相似问题