var
I, FoundPos: integer;
AColumn : TcxGridDBColumn;
AText : String;
begin
AText := 'Blue Sports';
with cxGrid1DBTableView1 do
begin
AColumn := GetColumnByFieldName('Company');
for I := 0 to ViewData.RecordCount - 1 do
if ViewData.Rows[I].IsData then
begin
ViewData.Rows[I].Focused := True;
with Controller.EditingController do
begin
ShowEdit(AColumn);
FoundPos := TcxRichEdit(Edit).FindText(AText, 0, Length(TcxRichEdit(Edit).Text), [stMatchCase]);
if not (FoundPos < 0) then
begin
TcxRichEdit(Edit).SelStart := FoundPos;
TcxRichEdit(Edit).SelLength := Length( AText);
SendMessage(TcxRichEdit(Edit).InnerControl.Handle,EM_SCROLLCARET, 0, 0);
Break;
end
else
CXGRID,定位并高亮
最新推荐文章于 2019-03-12 10:26:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)