0

Is there anyone who know if it is possible to have a cxGrid have a searchbar like in Outlook contacts where you just press one letter and the first contact with that letter in lastname is shown?

I would love to see an example of this, but so far my search everywhere has been without result.

NGLN
  • 43,011
  • 8
  • 105
  • 200
OZ8HP
  • 1,443
  • 4
  • 31
  • 61
  • 3
    Did you try asking this question to [DevExpress Support](http://www.devexpress.com/Support/Center/)? – NGLN Sep 24 '12 at 11:06
  • If the table is linked with a TDataset then filter the dataset onKeyUp – Ravaut123 Sep 24 '12 at 11:15
  • I have not asked it there and I am not going to. Don't ask why - it is personal. – OZ8HP Sep 24 '12 at 16:09
  • 1
    How does the answer to your question affect the answer that belongs here at Stack Overflow, @Ngln? – Rob Kennedy Sep 24 '12 at 17:19
  • 1
    The behavior you describe of Outlook's contact list is not what I observe. For me, it jumps to the first contact whose last name *starts with* the typed letter or, if there are no such contacts, to the first contact with a name starting *later* than the typed letter. (For example, I have no contacts whose names start with *R*, so when I press R, it jumps to my first *S* contact. Earlier in the list, I have a *B* contact whose name contains an *R*, but Outlook doesn't take me there.) – Rob Kennedy Sep 24 '12 at 17:32
  • @Rod Kennedy Maybe I wasn't so clear about what I was looking for. But it is just what you are describing I would like to add to a form with contacts. Now I have a grouping on the first letter of the companyname, but I don't think it looks nice are I find it a bit confusing. – OZ8HP Sep 24 '12 at 17:39
  • No time for an answer with code but look at the following to help implement custom searching in code: TcxCustomGridTableController.IncSearchingText in the ExpressQuantumGrid help file and the TcxDataControllerSearch Object in the ExpressDataController help file. –  Sep 25 '12 at 20:48

1 Answers1

0

You can enable de Filter bar in CxGrid doing the next steps:

At the Object Inspector you must change some properties

Step 1:

At the DBTableView.FilterRow property change:

DBTableView1 - FilterRow - ApplyChanges = fracImmedialety
DBTableView1 - FilterRow - Visible = True
DBTableView1 - FilterRow - InfoText = to add the text "Click here for filter creation (for substring search, begin with * character)"

Step 2:

At the DBTableView.DataController property change:

DBTableView1 -DataController-Filter-PercentWildCards = * ( will put instead of percent a star)
DBTableView1 -DataController-Filter-Options-fcoCaseInsensitive = True (any register)

DBTableView1 -DataController-Filter-Options-fcoShowOperatorDescription = True
Stephen Ostermiller
  • 23,933
  • 14
  • 88
  • 109