0

大家好,请帮助如何过滤devexpress xtragrid,使其不显示"!!!"以列代理开头的行。谢谢你。

4

2 回答 2

1

只需使用ColumnView.ActiveFilterString属性,如下所示:

gridControl.DataSource = new List<DataObj> { 
    new DataObj(){ Agent = "AMD" },
    new DataObj(){ Agent = "!!!AMD" },
};

((ColumnView)gridControl.MainView).ActiveFilterString = "[Agent] NOT LIKE '!!!%'";

甚至

((ColumnView)gridControl1.MainView).ActiveFilterString = "Not StartsWith([Agent], '!!!')";

相关帮助文章:过滤概述

于 2013-10-24T07:46:16.473 回答
-1

If the data is cumming from a SQL query, you could filter out rows having such data on the WHERE condition or in you code before binding to the datagrid. This is not a DevExpress issue.

于 2013-10-24T05:45:29.157 回答