简体   繁体   中英

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

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..

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

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!

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM