本示例主要介绍了如何创建自定义过滤项目,以及如何将这些过滤项目展示到Unit Price列的下拉列表框中。
C#
protected void ASPxGridView1_HeaderFilterFillItems(object sender,
ASPxGridViewHeaderFilterEventArgs e) {
if (e.Column.FieldName != "UnitPrice") return;
e.Values.Clear();
e.AddShowAll();
e.AddValue(String.Format("from {0:c2} to {1:c2}", 0, 50), string.Empty,
String.Format("[UnitPrice] > {0} and [UnitPrice] < {1}", 0, 50));
e.AddValue(String.Format(">= {0:c2}", 50), string.Empty,
String.Format("[UnitPrice] >= {0}", 50));
}
结果如下:
本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/411.html
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:DevExpress控件中文网 [https://www.devexpresscn.com/]
本文地址:https://www.devexpresscn.com/post/411.html
联系电话:023-68661681



返回