我想在devexpress上的ok按钮后存储过滤器表达式

时间:2013-02-13 13:05:34

标签: c# asp.net

我试图在DevExpress过滤器上按下ok按钮后存储过滤器表达式,我不知道该怎么做。

我想要表达式,所以我可以把她放在数据库中。 请帮帮我

1 个答案:

答案 0 :(得分:0)

在Ok按钮单击事件上,您可以将过滤字符串作为

string criteria = yourGridVIew.ActiveFilterString ;

您稍后可以重新分配到网格

yourGridView.ActiveFilterString = "([ProductID] = 1 OR [ProductID] = 3 " + 
  "OR [ProductID] > 10) AND [Discount] = 0"; // example

对于AspXGridVIew:

string filter =YourGridView.FilterExpression;