cxgrid中的lookupcombobox实现多列模糊查找最终版2

来源:互联网 发布:js 当前时间减去2天 编辑:程序博客网 时间:2024/04/29 13:54
模糊查询
1、设置属性
DropDownListStyle := lsEditList;

2、修改单元 cxCustomData.pas

11094行


function TcxCustomDataController.DoIncrementalFilterRecord(ARecordIndex: Integer): Boolean;var  S: string;begin  S := GetInternalDisplayText(ARecordIndex, FIncrementalFilterField);  //Result := DataCompareText(S, FIncrementalFilterText, True);//原来的  Result := AnsiContainsText(S, FIncrementalFilterText);//修改后的  要引用 StrUtils 单元end;

3、修改单元 cxLookupEdit.pas

function TcxCustomLookupEditLookupData.Locate(var AText, ATail: string; ANext: Boolean): Boolean;

491 行

ARecordIndex := Properties.FindByText(AItemIndex, AText, True);      //if ARecordIndex <> -1 then//原      if False then//修改后的





0 0
原创粉丝点击