0

I'm using Devexpress Gridcontrol. I'm trying to create a filter.

 Dim l as List(of Integer)

 Mygridview.ActiveFilterString="l.contains([id])

 MyGridview.ActiveFilterEnabled=True

But this is not working.The grid is not filtered. What can i do ?

antoni
  • 1
  • 6

1 Answers1

0

From the expression l.contains([id]) I see that you have tried to use VB.net syntax to create the filter expression. But the ColumnView.ActiveFilterString property accepts only the valid filter expression with using the special syntax. In short, a filter expression is a formula (or a set of formulas) that specifies how data should be filtered. Each expression contains three parts:

  • data field whose values should be filtered;
  • a filtering value that should be compared to records stored in the data field;
  • an operator that compares data field values with a filtering value.

GridView1.ActiveFilterString = "[ID] = 1 OR [ID] = 3

To learn more, see the Criteria Language Syntax article.

DmitryG
  • 17,677
  • 1
  • 30
  • 53