C# DevExpress GridControl : how to make search according to specific column text

2.1k views Asked by At

Some sort of list will be displayed when the program runs

I want to make search with entering text on textedit. When I hit a button the gridview will be refreshed and show that the same values on entered text.

For example:

Firma Adı:ABC(User enters)

  • ABC123
  • ABCDEF
  • .
  • .
  • .

How can I make filter such that with using editValueChanged?

Thank you..

2

There are 2 answers

0
GeorgeT On BEST ANSWER

DevExpress grid offers this functionality out of the box.

You just need to display the AutoFilter row:

  • either programmatically using gridView.OptionsView.ShowAutoFilterRow property
  • or as an end user by right clicking on the columns label area and selecting the relevant menu entry
1
Hambone On

In addition to @GeorgeT's suggesion (which is very good, by the way -- the AutoFilter row is a crowd pleaser), one other thought.

Dev express has a control that does exactly what you appear to be attempting. It's called the "Find Panel." You can have it show up at design time from the OptionsFind properties of the gridView, and you can also have it show up at runtime via:

gridView1.ShowFindPanel();

I suspect you will find this is far better than anything you can program by hand... and with one (or zero) line(s) of code!

enter image description here